OpenSceneGraph 0.1.2__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. OpenSceneGraph/OpenThreads.lib +0 -0
  2. OpenSceneGraph/_OpenSceneGraph.cp313-win_amd64.pyd +0 -0
  3. OpenSceneGraph/__init__.py +52 -0
  4. OpenSceneGraph/aipython/00-index.md +44 -0
  5. OpenSceneGraph/aipython/01-core.md +255 -0
  6. OpenSceneGraph/aipython/02-inspect.md +81 -0
  7. OpenSceneGraph/aipython/03-headless-frames.md +149 -0
  8. OpenSceneGraph/aipython/05-camera-manipulator.md +68 -0
  9. OpenSceneGraph/aipython/06-camera-effects.md +132 -0
  10. OpenSceneGraph/aipython/07-camera-manual.md +88 -0
  11. OpenSceneGraph/aipython/08-lighting.md +121 -0
  12. OpenSceneGraph/aipython/09-picking.md +90 -0
  13. OpenSceneGraph/aipython/10-rtt.md +199 -0
  14. OpenSceneGraph/aipython/11-mrt.md +104 -0
  15. OpenSceneGraph/aipython/12-gbuffer.md +48 -0
  16. OpenSceneGraph/aipython/15-shader-hotswap.md +72 -0
  17. OpenSceneGraph/aipython/17-particles.md +189 -0
  18. OpenSceneGraph/aipython/18-deterministic-captures.md +157 -0
  19. OpenSceneGraph/aipython/20-object-lifetime.md +77 -0
  20. OpenSceneGraph/aipython/25-async-osgpy.md +228 -0
  21. OpenSceneGraph/aipython/29-material.md +109 -0
  22. OpenSceneGraph/aipython/30-pbribl.md +162 -0
  23. OpenSceneGraph/aipython/40-typed-lights-gizmos.md +218 -0
  24. OpenSceneGraph/examples/__init__.py +24 -0
  25. OpenSceneGraph/examples/__main__.py +143 -0
  26. OpenSceneGraph/examples/blur.py +370 -0
  27. OpenSceneGraph/examples/info.py +126 -0
  28. OpenSceneGraph/examples/mrt.py +493 -0
  29. OpenSceneGraph/examples/pyosg_async.py +467 -0
  30. OpenSceneGraph/examples/pyosg_example.py +120 -0
  31. OpenSceneGraph/examples/pyosg_repl.py +842 -0
  32. OpenSceneGraph/examples/pyosg_visitor.py +138 -0
  33. OpenSceneGraph/ktx.dll +0 -0
  34. OpenSceneGraph/ktx.lib +0 -0
  35. OpenSceneGraph/osg.lib +0 -0
  36. OpenSceneGraph/osg161-osg.dll +0 -0
  37. OpenSceneGraph/osg161-osgAnimation.dll +0 -0
  38. OpenSceneGraph/osg161-osgDB.dll +0 -0
  39. OpenSceneGraph/osg161-osgFX.dll +0 -0
  40. OpenSceneGraph/osg161-osgGA.dll +0 -0
  41. OpenSceneGraph/osg161-osgText.dll +0 -0
  42. OpenSceneGraph/osg161-osgUtil.dll +0 -0
  43. OpenSceneGraph/osg161-osgViewer.dll +0 -0
  44. OpenSceneGraph/osg161-osgWidget.dll +0 -0
  45. OpenSceneGraph/osgAnimation.lib +0 -0
  46. OpenSceneGraph/osgDB.lib +0 -0
  47. OpenSceneGraph/osgFX.lib +0 -0
  48. OpenSceneGraph/osgGA.lib +0 -0
  49. OpenSceneGraph/osgPlugins-3.6.5/jpeg62-ebb2f26be87097e77bafd1e9095b4820.dll +0 -0
  50. OpenSceneGraph/osgPlugins-3.6.5/ktx.dll +0 -0
  51. OpenSceneGraph/osgPlugins-3.6.5/liblzma-b9cff3753c4848b9ff1350ba5a053c6e.dll +0 -0
  52. OpenSceneGraph/osgPlugins-3.6.5/libpng16-36b7e1e8d185cb21280e5688f99660c0.dll +0 -0
  53. OpenSceneGraph/osgPlugins-3.6.5/msvcp140.dll +0 -0
  54. OpenSceneGraph/osgPlugins-3.6.5/osgdb_bmp.dll +0 -0
  55. OpenSceneGraph/osgPlugins-3.6.5/osgdb_dds.dll +0 -0
  56. OpenSceneGraph/osgPlugins-3.6.5/osgdb_gltf.dll +0 -0
  57. OpenSceneGraph/osgPlugins-3.6.5/osgdb_hdr.dll +0 -0
  58. OpenSceneGraph/osgPlugins-3.6.5/osgdb_jpeg.dll +0 -0
  59. OpenSceneGraph/osgPlugins-3.6.5/osgdb_ktx2.dll +0 -0
  60. OpenSceneGraph/osgPlugins-3.6.5/osgdb_obj.dll +0 -0
  61. OpenSceneGraph/osgPlugins-3.6.5/osgdb_osg.dll +0 -0
  62. OpenSceneGraph/osgPlugins-3.6.5/osgdb_png.dll +0 -0
  63. OpenSceneGraph/osgPlugins-3.6.5/osgdb_pnm.dll +0 -0
  64. OpenSceneGraph/osgPlugins-3.6.5/osgdb_rgb.dll +0 -0
  65. OpenSceneGraph/osgPlugins-3.6.5/osgdb_serializers_osg.dll +0 -0
  66. OpenSceneGraph/osgPlugins-3.6.5/osgdb_stl.dll +0 -0
  67. OpenSceneGraph/osgPlugins-3.6.5/osgdb_tga.dll +0 -0
  68. OpenSceneGraph/osgPlugins-3.6.5/osgdb_tiff.dll +0 -0
  69. OpenSceneGraph/osgPlugins-3.6.5/tiff-1defa8059e5ba115a3ab4b120de6f4bb.dll +0 -0
  70. OpenSceneGraph/osgPlugins-3.6.5/z.dll +0 -0
  71. OpenSceneGraph/osgText.lib +0 -0
  72. OpenSceneGraph/osgUtil.lib +0 -0
  73. OpenSceneGraph/osgViewer.lib +0 -0
  74. OpenSceneGraph/osgWidget.lib +0 -0
  75. OpenSceneGraph/osgx.cp313-win_amd64.pyd +0 -0
  76. OpenSceneGraph/osgx_static.lib +0 -0
  77. OpenSceneGraph/ot21-OpenThreads.dll +0 -0
  78. openscenegraph-0.1.2.dist-info/DELVEWHEEL +2 -0
  79. openscenegraph-0.1.2.dist-info/METADATA +563 -0
  80. openscenegraph-0.1.2.dist-info/RECORD +90 -0
  81. openscenegraph-0.1.2.dist-info/WHEEL +5 -0
  82. openscenegraph-0.1.2.dist-info/entry_points.txt +6 -0
  83. openscenegraph-0.1.2.dist-info/licenses/LICENSE +21 -0
  84. openscenegraph.libs/jpeg62-ebb2f26be87097e77bafd1e9095b4820.dll +0 -0
  85. openscenegraph.libs/liblzma-b9cff3753c4848b9ff1350ba5a053c6e.dll +0 -0
  86. openscenegraph.libs/libpng16-36b7e1e8d185cb21280e5688f99660c0.dll +0 -0
  87. openscenegraph.libs/msvcp140.dll +0 -0
  88. openscenegraph.libs/tiff-1defa8059e5ba115a3ab4b120de6f4bb.dll +0 -0
  89. openscenegraph.libs/z.dll +0 -0
  90. osgx.py +7 -0
@@ -0,0 +1,138 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import os
4
+
5
+ # setdefault(), not update() -- this module is imported by other examples (pyosg-mrt.py,
6
+ # etc.) that configure their own OSG_WINDOW/OSG_THREADING before importing pyosg_visitor for
7
+ # its GatherVisitor. update() here would silently clobber whatever the caller already set.
8
+ # Only pyosg_visitor.py's own standalone __main__ use below relies on these being filled in.
9
+ os.environ.setdefault("OSG_WINDOW", "50 50 800 600")
10
+ os.environ.setdefault("OSG_THREADING", "SingleThreaded")
11
+ os.environ.setdefault("OSG_GL_CONTEXT_PROFILE_MASK", "1")
12
+ os.environ.setdefault("OSG_GL_VERSION", "4.6")
13
+ os.environ.setdefault("OSG_GL_CONTEXT_VERSION", "4.6")
14
+
15
+ from OpenSceneGraph import *
16
+
17
+ # GatherVisitor: a scene-graph inspector, proof-of-concept for a future "active state" panel
18
+ # (e.g. showing every live shader/uniform in a GUI alongside the viewport). Walks the graph
19
+ # and reports every attached Program/Uniform via `osg.notice()`. Meant to be imported --
20
+ # `from pyosg_visitor import GatherVisitor` -- and fired at any live scene, same shape as
21
+ # `pyosg_repl.py`'s `repl()` helper.
22
+ #
23
+ # This originally surfaced two real binding gaps -- osg.Node had no non-creating
24
+ # getStateSet(), and osg.StateSet had no way to read a Program back out once attached --
25
+ # both since fixed (osg.getStateSet(node) and StateSet.attributes[], respectively).
26
+
27
+ VERTEX_SHADER = """#version 460 core
28
+
29
+ in vec4 osg_Vertex;
30
+ in vec3 osg_Normal;
31
+
32
+ uniform mat4 osg_ModelViewProjectionMatrix;
33
+ uniform mat3 osg_NormalMatrix;
34
+
35
+ out vec3 vNormal;
36
+
37
+ void main() {
38
+ vNormal = normalize(osg_NormalMatrix * osg_Normal);
39
+
40
+ gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
41
+ }
42
+ """
43
+
44
+ FRAGMENT_SHADER = """#version 460 core
45
+
46
+ in vec3 vNormal;
47
+
48
+ out vec4 fragColor;
49
+
50
+ uniform vec3 lightDir;
51
+
52
+ void main() {
53
+ vec3 N = normalize(vNormal);
54
+ float diff = max(dot(N, normalize(lightDir)), 0.0);
55
+
56
+ fragColor = vec4(vec3(0.9, 0.6, 0.3) * diff, 1.0);
57
+ }
58
+ """
59
+
60
+ class GatherVisitor(osg.NodeVisitor):
61
+ """`namespace`, if given (e.g. `locals()`/`globals()` at the call site), is scanned ONCE for
62
+ `.addr`-bearing values; any gathered object whose `.addr` matches gets an extra "bound to
63
+ local: 'x'" hint. Only finds BARE top-level names in that dict -- an object only reachable
64
+ via a chain (e.g. `hudCam.stateSet.attributes[PROGRAM]`) won't get a hint, and that's fine.
65
+ """
66
+
67
+ def __init__(self, namespace=None):
68
+ super().__init__(osg.NodeVisitor.TraversalMode.TRAVERSE_ALL_CHILDREN)
69
+
70
+ self._by_addr = {}
71
+
72
+ for name, value in (namespace or {}).items():
73
+ addr = getattr(value, "addr", None)
74
+
75
+ if addr is not None:
76
+ self._by_addr.setdefault(addr, []).append(name)
77
+
78
+ def _hint(self, obj):
79
+ names = self._by_addr.get(obj.addr)
80
+
81
+ if not names:
82
+ return ""
83
+
84
+ plural = "s" if len(names) > 1 else ""
85
+
86
+ return f" (bound to local{plural}: {', '.join(repr(n) for n in names)})"
87
+
88
+ def apply(self, node):
89
+ osg.notice(f"[gather] {type(node).__name__} '{node.name}'{self._hint(node)}")
90
+
91
+ ss = osg.getStateSet(node)
92
+
93
+ if ss is None:
94
+ return
95
+
96
+ if osg.StateAttribute.PROGRAM in ss.attributes:
97
+ program = ss.attributes[osg.StateAttribute.PROGRAM]
98
+
99
+ osg.notice(f" [gather] Program: {program.name}{self._hint(program)}")
100
+
101
+ for shader in program.shaders:
102
+ lines = shader.source.splitlines()
103
+ preview = next((l.strip() for l in lines if l.strip()), "")
104
+
105
+ osg.notice(f" {shader.type}: {len(lines)} lines, starts: {preview!r}")
106
+
107
+ names = list(ss.uniforms.keys())
108
+
109
+ osg.notice(f" [gather] Uniforms: {names or '(none)'}")
110
+
111
+ for name in names:
112
+ u = ss.uniforms[name]
113
+
114
+ osg.notice(f" {name}: type={u.type}{self._hint(u)}")
115
+
116
+ if __name__ == "__main__":
117
+ osg.setNotifyLevel(osg.NotifySeverity.NOTICE)
118
+
119
+ geode = osg.Geode(drawables=(
120
+ osg.ShapeDrawable(osg.Sphere(osg.Vec3(0, 0, 0), 1.0)),
121
+ ))
122
+
123
+ p = osg.Program(name="visitor-proof", shaders=(
124
+ osg.Shader(osg.Shader.VERTEX, VERTEX_SHADER),
125
+ osg.Shader(osg.Shader.FRAGMENT, FRAGMENT_SHADER)
126
+ ))
127
+
128
+ geode.stateSet.attributes.append(p)
129
+ geode.stateSet.uniforms["lightDir"] = osg.Vec3(0.5, 0.8, 0.3)
130
+
131
+ geode.accept(GatherVisitor(namespace=locals()))
132
+
133
+ v = osgViewer.Viewer()
134
+ v.sceneData = geode
135
+ v.cameraManipulator = osgGA.TrackballManipulator()
136
+
137
+ while not v.done:
138
+ v.frame()
OpenSceneGraph/ktx.dll ADDED
Binary file
OpenSceneGraph/ktx.lib ADDED
Binary file
OpenSceneGraph/osg.lib ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ Version: 1.13.1
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ljxe6p30\\cp313-win_amd64\\build\\venv\\Lib\\site-packages\\delvewheel\\__main__.py', 'repair', '--ignore-existing', '--analyze-existing', '--add-path', 'C:/vcpkg/installed/x64-windows/bin', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ljxe6p30\\cp313-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ljxe6p30\\cp313-win_amd64\\built_wheel\\openscenegraph-0.1.2-cp313-cp313-win_amd64.whl']