Changes between Version 20 and Version 21 of GraphicsAPI
- Timestamp:
- Nov 13, 2014, 11:59:34 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GraphicsAPI
v20 v21 18 18 19 19 These classes handle representing the scene, rendering it, and selecting parts of it. The "scene graph" is the geometric shapes, colors and transparency including hierarchy and instancing, also including the concept of selected part, all handled by the Drawing class. A Drawing can have any number of child Drawings, to any depth, in a tree. Some classes handle the rendering (View, Camera, Lighting, !CrossFade, !MotionBlur) including effects like silhouette edges, shadows, ambient occlusion, depth cuing, cross fades, and also camera modes like mono, shutter glasses stereo, or oculus rift. Also image save including supersampling, the graphics redraw loop, and interactive center of rotation are managed by View. Selecting objects using a mouse click is handled by View and Drawing. 20 21 == Private OpenGL classes ==22 23 The Hydra graphics module also has many private classes like Render, Shader, Framebuffer, Bindings, ... that are lower level OpenGL Python classes. Those are not used outside the graphics module currently. All the OpenGL is in one file graphics/opengl.py wrapped to make the OpenGL use more object oriented. No other code directly makes OpenGL calls.24 20 25 21 == Complexity == … … 50 46 Developing a new type of rendering is rare. In Chimera 1 we have molecule, density map, surface, vrml models, and maybe 2d labels. I don't know of any case where an outside developer tried to add a different type of rendering. This seems a very advanced programming task. So maybe the API for Drawing which is what all model types use for rendering does not need to be public. Instead a much simpler single level (no hierarchy) Surface model could be made a public API. The View and Camera classes control rendering and probably are of use to many outside developers. 51 47 48 == Private OpenGL classes == 49 50 The Hydra graphics module also has many private classes like Render, Shader, Framebuffer, Bindings, ... that are lower level OpenGL Python classes. Those are not used outside the graphics module currently. All the OpenGL is in one file graphics/opengl.py wrapped to make the OpenGL use more object oriented. No other code directly makes OpenGL calls. 51 52 52 == WebGL == 53 53