jit.gl.render is used as a central hub for all OpenGL rendering in Max. This object, along with a jit.window or jit.pwindow to draw to, provides a context for other OpenGL objects. It regulates the drawing of each graphics frame, and some jit.gl.render attributes can determine properties and behaviors of the OpenGL objects that are using it as a context.
- To create a "fade" effect between rendered frames, you can set the alpha channel value of the @erase_color attribute. @erase_color uses four float values (0.-1.) as its arguments, red, green, blue, alpha.
- Use the @camera attribute to set the visible frame in 3D space.
- Some of jit.gl.render's attributes can be inherited by other objects using the same context. This way you can set, say, lighting values on all objects in a "scene".
- The 'screentoworld' and 'worldtoscreen' messages allow for conversion between "screen" coordinates and OpenGL "world" coordinates. This can be useful for using mouse clicks in a jit.window or jit.pwindow to affect things in the OpenGL world.
- The first argument for a jit.gl.render object is a 'context' name. In Max 6, f you do not provide this, it will auto-generate a name, creating an "implicit" context. This eliminates the need for typing in a context name for all jit.gl.* objects, instead using the patcher hierarchy to find the first available renderer. This makes for less typing and easier to build reusable jit.gl.* abstractions which are not dependent on a specifically named rendering context.
Third-Party Max externals similar to the jit.gl.render object
Maxobjects.com listing for the jit.gl.render object
People who looked at/used this object also looked at....
Errors or Clarifications
(please list things that you believe to be errors or omissions from the existing refpage)