Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GLGraphicsStateGuardian Class Reference

A GraphicsStateGuardian specialized for rendering into OpenGL contexts. More...

#include <glGraphicsStateGuardian.h>

Inheritance diagram for GLGraphicsStateGuardian:

GraphicsStateGuardian GraphicsStateGuardianBase TypedReferenceCount TypedObject ReferenceCount glxGraphicsStateGuardian wglGraphicsStateGuardian List of all members.

Public Member Functions

 GLGraphicsStateGuardian (const FrameBufferProperties &properties)
virtual ~GLGraphicsStateGuardian ()
virtual void reset ()
 Resets all internal state as if the gsg were newly created.

virtual void do_clear (const RenderBuffer &buffer)
 Clears all of the indicated buffers to their assigned colors.

virtual void prepare_display_region ()
 Prepare a display region for rendering (set up scissor region and viewport).

virtual bool prepare_lens ()
 Makes the current lens (whichever lens was most recently specified with push_lens()) active, so that it will transform future rendered geometry.

virtual bool begin_frame ()
 Called before each frame is rendered, to allow the GSG a chance to do any internal cleanup before beginning the frame.

virtual void end_frame ()
 Called after each frame is rendered, to allow the GSG a chance to do any internal cleanup after rendering the frame, and before the window flips.

virtual void draw_point (GeomPoint *geom, GeomContext *gc)
virtual void draw_line (GeomLine *geom, GeomContext *gc)
virtual void draw_linestrip (GeomLinestrip *geom, GeomContext *gc)
virtual void draw_sprite (GeomSprite *geom, GeomContext *gc)
virtual void draw_polygon (GeomPolygon *geom, GeomContext *gc)
virtual void draw_quad (GeomQuad *geom, GeomContext *gc)
virtual void draw_tri (GeomTri *geom, GeomContext *gc)
virtual void draw_tristrip (GeomTristrip *geom, GeomContext *gc)
virtual void draw_trifan (GeomTrifan *geom, GeomContext *gc)
virtual void draw_sphere (GeomSphere *geom, GeomContext *gc)
virtual TextureContextprepare_texture (Texture *tex)
 Creates a new retained-mode representation of the given texture, and returns a newly-allocated TextureContext pointer to reference it.

virtual void apply_texture (TextureContext *tc)
 Makes the texture the currently available texture for rendering.

virtual void release_texture (TextureContext *tc)
 Frees the GL resources previously allocated for the texture.

virtual GeomNodeContextprepare_geom_node (GeomNode *node)
 Prepares the indicated GeomNode for retained-mode rendering.

virtual void draw_geom_node (GeomNode *node, const RenderState *state, GeomNodeContext *gnc)
 Draws a GeomNode previously indicated by a call to prepare_geom_node().

virtual void release_geom_node (GeomNodeContext *gnc)
 Frees the resources previously allocated via a call to prepare_geom_node(), including deleting the GeomNodeContext itself, if necessary.

virtual void copy_texture (TextureContext *tc, const DisplayRegion *dr)
 Copy the pixel region indicated by the display region from the framebuffer into texture memory.

virtual void copy_texture (TextureContext *tc, const DisplayRegion *dr, const RenderBuffer &rb)
virtual void texture_to_pixel_buffer (TextureContext *tc, PixelBuffer *pb)
virtual void texture_to_pixel_buffer (TextureContext *tc, PixelBuffer *pb, const DisplayRegion *dr)
virtual void copy_pixel_buffer (PixelBuffer *pb, const DisplayRegion *dr)
virtual void copy_pixel_buffer (PixelBuffer *pb, const DisplayRegion *dr, const RenderBuffer &rb)
virtual void apply_material (const Material *material)
void apply_fog (Fog *fog)
virtual void issue_transform (const TransformState *transform)
 Sends the indicated transform matrix to the graphics API to be applied to future vertices.

virtual void issue_tex_matrix (const TexMatrixAttrib *attrib)
virtual void issue_texture (const TextureAttrib *attrib)
virtual void issue_material (const MaterialAttrib *attrib)
virtual void issue_render_mode (const RenderModeAttrib *attrib)
virtual void issue_texture_apply (const TextureApplyAttrib *attrib)
virtual void issue_color_write (const ColorWriteAttrib *attrib)
virtual void issue_depth_test (const DepthTestAttrib *attrib)
virtual void issue_alpha_test (const AlphaTestAttrib *attrib)
virtual void issue_depth_write (const DepthWriteAttrib *attrib)
virtual void issue_cull_face (const CullFaceAttrib *attrib)
virtual void issue_fog (const FogAttrib *attrib)
virtual void issue_depth_offset (const DepthOffsetAttrib *attrib)
virtual void bind_light (PointLight *light, int light_id)
 Called the first time a particular light has been bound to a given id within a frame, this should set up the associated hardware light with the light's properties.

virtual void bind_light (DirectionalLight *light, int light_id)
 Called the first time a particular light has been bound to a given id within a frame, this should set up the associated hardware light with the light's properties.

virtual void bind_light (Spotlight *light, int light_id)
 Called the first time a particular light has been bound to a given id within a frame, this should set up the associated hardware light with the light's properties.

virtual bool wants_normals (void) const
virtual bool wants_texcoords (void) const
virtual bool depth_offset_decals ()
 Returns true if this GSG can implement decals using a DepthOffsetAttrib, or false if that is unreliable and the three-step rendering process should be used instead.

virtual CoordinateSystem get_internal_coordinate_system () const
 Should be overridden by derived classes to return the coordinate system used internally by the GSG, if any one particular coordinate system is used.

virtual float compute_distance_to (const LPoint3f &point) const
 This function may only be called during a render traversal; it will compute the distance to the indicated point, assumed to be in modelview coordinates, from the camera plane.

void print_gfx_visual ()
 Prints a description of the current visual selected.

void dump_state (void)
void issue_transformed_color (const Colorf &color) const
 Transform the color by the current color matrix, and calls the appropriate glColor function.

virtual TypeHandle get_type (void) const
virtual TypeHandle force_init_type ()
void release_all_textures ()
 Frees the resources for all textures associated with this GSG.

void release_all_geoms ()
 Frees the resources for all Geoms and GeomNodes associated with this GSG.

const FrameBufferPropertiesget_properties () const
 Returns the frame buffer properties requested for this GSG.

GraphicsPipeget_pipe () const
 Returns the graphics pipe on which this GSG was created.

const GraphicsThreadingModelget_threading_model () const
 Returns the threading model that was used to create this GSG.

void set_scene (SceneSetup *scene_setup)
 Sets the SceneSetup object that indicates the initial camera position, etc.

SceneSetupget_scene () const
 Returns the SceneSetup object.

virtual GeomContextprepare_geom (Geom *geom)
 Prepares the indicated Geom for retained-mode rendering.

virtual void release_geom (GeomContext *gc)
 Frees the resources previously allocated via a call to prepare_geom(), including deleting the GeomContext itself, if necessary.

virtual void set_state_and_transform (const RenderState *state, const TransformState *transform)
 Simultaneously resets the render state and the transform state.

virtual void set_color_clear_value (const Colorf &value)
 Sets the color that the next do_clear() command will set the color buffer to.

virtual void set_depth_clear_value (const float value)
 Sets the depth that the next do_clear() command will set the depth buffer to.

void clear (ClearableRegion *clearable)
 Clears the framebuffer within the current DisplayRegion, according to the flags indicated by the given ClearableRegion object.

void clear (DisplayRegion *dr)
 Clears the framebuffer within the indicated DisplayRegion, according to the flags indicated by the DisplayRegion object (inheriting from ClearableRegion).

void enable_normals (bool val)
virtual bool begin_scene ()
 Called between begin_frame() and end_frame() to mark the beginning of drawing commands for a "scene" (usually a particular DisplayRegion) within a frame.

virtual void end_scene ()
 Called between begin_frame() and end_frame() to mark the end of drawing commands for a "scene" (usually a particular DisplayRegion) within a frame.

virtual bool wants_colors () const
 Returns true if the GSG should issue geometry color commands, false otherwise.

virtual ConstPointerTo< RenderStatebegin_decal_base_first ()
 Called during draw to begin a three-step rendering phase to draw decals.

virtual ConstPointerTo< RenderStatebegin_decal_nested ()
 Called during draw to begin a three-step rendering phase to draw decals.

virtual ConstPointerTo< RenderStatebegin_decal_base_second ()
 Called during draw to begin a three-step rendering phase to draw decals.

virtual void finish_decal ()
 Called during draw to clean up after decals are finished.

void reset_if_new ()
 Calls reset() to initialize the GSG, but only if it hasn't been called yet.

void modify_state (const RenderState *state)
 Applies the attributes indicated in the state set to the current state, and issues the changes to the graphics hardware.

void set_state (const RenderState *state)
 Applies the attributes indicated in the state set to the current state, and issues the changes to the graphics hardware.

void set_transform (const TransformState *transform)
 Sets the world transform that will be applied to subsequent geometry.

RenderBuffer get_render_buffer (int buffer_type)
 Returns a RenderBuffer object suitable for operating on the requested set of buffers.

const DisplayRegionget_current_display_region (void) const
 Returns the current display region being rendered to, as set by the last call to push_display_region() (or restored by pop_display_region()).

const Lensget_current_lens () const
 Returns the current lens being rendered with, as set by the last call to push_lens() (or restored by pop_lens()).

DisplayRegionStack push_display_region (const DisplayRegion *dr)
 Saves the current display region information and sets up a new display region for rendering.

void pop_display_region (DisplayRegionStack &node)
 Restores the display region previously in effect, before the matching call to push_display_region().

FrameBufferStack push_frame_buffer (const RenderBuffer &buffer, const DisplayRegion *dr)
 Saves the contents of the frame buffer (within the indicated display region only) so that rendering may be performed (for instance, to render a partial in a multipass algorithm) and the frame buffer later restored via a matching call to pop_frame_buffer().

void pop_frame_buffer (FrameBufferStack &node)
 Restores the contents of the frame buffer as saved by a previous call to push_frame_buffer().

LensStack push_lens (const Lens *lens)
 Saves the current lens information and sets up a new lens for rendering.

void pop_lens (LensStack &stack)
 Restores the lens previously in effect, before the matching call to push_lens().

bool set_lens (const Lens *lens)
 Sets a new lens for rendering without bothering to push or pop.

void set_coordinate_system (CoordinateSystem cs)
 Changes the coordinate system in effect on this particular gsg.

CoordinateSystem get_coordinate_system () const
 Returns the coordinate system in effect on this particular gsg.

virtual void issue_color_scale (const ColorScaleAttrib *attrib)
virtual void issue_color (const ColorAttrib *attrib)
 This method is defined in the base class because it is likely that this functionality will be used for all (or at least most) kinds of GraphicsStateGuardians--it's not specific to any one rendering backend.

virtual void issue_light (const LightAttrib *attrib)
 The default implementation of issue_light() assumes we have a limited number of hardware lights available.

virtual void issue_transparency (const TransparencyAttrib *attrib)
virtual void issue_color_blend (const ColorBlendAttrib *attrib)
virtual void issue_clip_plane (const ClipPlaneAttrib *attrib)
 This is fundametically similar to issue_light(), with calls to slot_new_clip_plane(), apply_clip_plane(), and enable_clip_planes(), as appropriate.

void traverse_prepared_textures (bool(*pertex_callbackfn)(TextureContext *, void *), void *callback_arg)
virtual void issue_tex_gen (const TexGenAttrib *)
virtual void issue_stencil (const StencilAttrib *)
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.

bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.

int get_ref_count () const
 Returns the current reference count.

int ref () const
 Explicitly increments the reference count.

int unref () const
 Explicitly decrements the reference count.

void test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.


Static Public Member Functions

void report_errors (int line, const char *source_file)
 Checks for any outstanding error codes and outputs them, if found.

GraphicsStateGuardianmake_GlGraphicsStateGuardian (const FactoryParams &params)
TypeHandle get_class_type (void)
void init_type (void)

Static Public Attributes

PStatCollector _vertices_display_list_pcollector
PStatCollector _total_texusage_pcollector
PStatCollector _active_texusage_pcollector
PStatCollector _total_geom_pcollector
PStatCollector _active_geom_pcollector
PStatCollector _total_geom_node_pcollector
PStatCollector _active_geom_node_pcollector
PStatCollector _total_texmem_pcollector
PStatCollector _used_texmem_pcollector
PStatCollector _texmgrmem_total_pcollector
PStatCollector _texmgrmem_resident_pcollector
PStatCollector _vertices_pcollector
PStatCollector _vertices_tristrip_pcollector
PStatCollector _vertices_trifan_pcollector
PStatCollector _vertices_tri_pcollector
PStatCollector _vertices_other_pcollector
PStatCollector _state_changes_pcollector
PStatCollector _transform_state_pcollector
PStatCollector _texture_state_pcollector
PStatCollector _nodes_pcollector
PStatCollector _geom_nodes_pcollector
PStatCollector _frustum_cull_volumes_pcollector
PStatCollector _frustum_cull_transforms_pcollector
PStatCollector _set_state_pcollector
PStatCollector _draw_primitive_pcollector
PStatCollector _transform_states_pcollector
PStatCollector _transform_states_unused_pcollector
PStatCollector _render_states_pcollector
PStatCollector _render_states_unused_pcollector

Protected Types

enum  ColorTransform { CT_offset = 0x01, CT_scale = 0x02 }

Protected Member Functions

virtual bool slot_new_light (int light_id)
 This will be called by the base class before a particular light id will be used for the first time.

virtual void enable_lighting (bool enable)
 Intended to be overridden by a derived class to enable or disable the use of lighting overall.

virtual void set_ambient_light (const Colorf &color)
 Intended to be overridden by a derived class to indicate the color of the ambient light that should be in effect.

virtual void enable_light (int light_id, bool enable)
 Intended to be overridden by a derived class to enable the indicated light id.

virtual void begin_bind_lights ()
 Called immediately before bind_light() is called, this is intended to provide the derived class a hook in which to set up some state (like transform) that might apply to several lights.

virtual void end_bind_lights ()
 Called after before bind_light() has been called one or more times (but before any geometry is issued or additional state is changed), this is intended to clean up any temporary changes to the state that may have been made by begin_bind_lights().

virtual bool slot_new_clip_plane (int plane_id)
 This will be called by the base class before a particular clip plane id will be used for the first time.

virtual void enable_clip_plane (int plane_id, bool enable)
 Intended to be overridden by a derived class to enable the indicated clip_plane id.

virtual void begin_bind_clip_planes ()
 Called immediately before bind_clip_plane() is called, this is intended to provide the derived class a hook in which to set up some state (like transform) that might apply to several clip_planes.

virtual void bind_clip_plane (PlaneNode *plane, int plane_id)
 Called the first time a particular clip_plane has been bound to a given id within a frame, this should set up the associated hardware clip_plane with the clip_plane's properties.

virtual void end_bind_clip_planes ()
 Called after before bind_clip_plane() has been called one or more times (but before any geometry is issued or additional state is changed), this is intended to clean up any temporary changes to the state that may have been made by begin_bind_clip_planes().

virtual void set_blend_mode (ColorWriteAttrib::Mode color_write_mode, ColorBlendAttrib::Mode color_blend_mode, TransparencyAttrib::Mode transparency_mode)
 Called after any of these three blending states have changed; this function is responsible for setting the appropriate color blending mode based on the given properties.

virtual void free_pointers ()
 Frees some memory that was explicitly allocated within the glgsg.

virtual PointerTo< SavedFrameBuffersave_frame_buffer (const RenderBuffer &buffer, ConstPointerTo< DisplayRegion > dr)
 Saves the indicated planes of the frame buffer (within the indicated display region) and returns it in some meaningful form that can be restored later via restore_frame_buffer().

virtual void restore_frame_buffer (SavedFrameBuffer *frame_buffer)
 Restores the frame buffer that was previously saved.

void call_glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void call_glClearDepth (GLclampd depth)
void call_glClearStencil (GLint s)
void call_glClearAccum (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void call_glDrawBuffer (GLenum mode)
void call_glReadBuffer (GLenum mode)
void call_glShadeModel (GLenum mode)
 Set the shading model to be either GL_FLAT or GL_SMOOTH.

void call_glBlendFunc (GLenum sfunc, GLenum dfunc)
void call_glCullFace (GLenum mode)
void call_glScissor (GLint x, GLint y, GLsizei width, GLsizei height)
void call_glViewport (GLint x, GLint y, GLsizei width, GLsizei height)
void call_glLightModelLocal (GLboolean local)
void call_glLightModelTwoSide (GLboolean twoside)
void call_glStencilFunc (GLenum func, GLint refval, GLuint mask)
void call_glStencilOp (GLenum fail, GLenum zfail, GLenum pass)
void call_glClipPlane (GLenum plane, const double equation[4])
void call_glLineWidth (GLfloat width)
void call_glPointSize (GLfloat size)
void call_glFogMode (GLint mode)
void call_glFogStart (GLfloat start)
void call_glFogEnd (GLfloat end)
void call_glFogDensity (GLfloat density)
void call_glFogColor (const Colorf &color)
void call_glAlphaFunc (GLenum func, GLclampf ref)
void call_glPolygonMode (GLenum mode)
void set_pack_alignment (GLint alignment)
void set_unpack_alignment (GLint alignment)
void enable_multisample (bool val)
void enable_line_smooth (bool val)
void enable_point_smooth (bool val)
void enable_texturing (bool val)
void enable_scissor (bool val)
void enable_stencil_test (bool val)
void enable_multisample_alpha_one (bool val)
void enable_multisample_alpha_mask (bool val)
void enable_blend (bool val)
void enable_depth_test (bool val)
void enable_fog (bool val)
void enable_alpha_test (bool val)
void enable_polygon_offset (bool val)
GLenum get_light_id (int index) const
 Convert index to gl light id.

GLenum get_clip_plane_id (int index) const
 Convert index to gl clip plane id.

void issue_scene_graph_color ()
 Checks whether the scene graph color needs to be issued, and sends the appropriate glColor command if it does.

void set_draw_buffer (const RenderBuffer &rb)
 Sets up the glDrawBuffer to render into the buffer indicated by the RenderBuffer object.

void set_read_buffer (const RenderBuffer &rb)
 Sets up the glReadBuffer to render into the buffer indicated by the RenderBuffer object.

void bind_texture (TextureContext *tc)
void specify_texture (Texture *tex)
bool apply_texture_immediate (Texture *tex)
 Sends the texture image to GL.

void draw_texture (TextureContext *tc, const DisplayRegion *dr)
 Copies the texture image directly onto the frame buffer within the indicated display region.

void draw_texture (TextureContext *tc, const DisplayRegion *dr, const RenderBuffer &rb)
void draw_pixel_buffer (PixelBuffer *pb, const DisplayRegion *dr)
 Copies the indicated pixel buffer into the frame buffer in the given display region.

void draw_pixel_buffer (PixelBuffer *pb, const DisplayRegion *dr, const RenderBuffer &rb)
GLenum get_texture_wrap_mode (Texture::WrapMode wm)
 Maps from the Texture's internal wrap mode symbols to GL's.

GLenum get_texture_filter_type (Texture::FilterType ft)
 Maps from the Texture's internal filter type symbols to GL's.

GLenum get_image_type (PixelBuffer::Type type)
 Maps from the PixelBuffer's internal Type symbols to GL's.

GLenum get_external_image_format (PixelBuffer::Format format)
 Maps from the PixelBuffer's Format symbols to GL's.

GLenum get_internal_image_format (PixelBuffer::Format format)
 Maps from the PixelBuffer's Format symbols to a suitable internal format for GL textures.

GLint get_texture_apply_mode_type (TextureApplyAttrib::Mode am) const
 Maps from the texture environment's mode types to the corresponding OpenGL ids.

GLenum get_fog_mode_type (Fog::Mode m) const
 Maps from the fog types to gl version.

void build_phony_mipmaps (Texture *tex)
 Generates a series of colored mipmap levels to aid in visualizing the mipmap levels as the hardware applies them.

void build_phony_mipmap_level (int level, int xsize, int ysize)
 Generates a single colored mipmap level.

void save_mipmap_images (Texture *tex)
 Saves out each mipmap level of the indicated texture (which must also be the currently active texture in the GL state) as a separate image file to disk.

Lightget_light (int light_id) const
 Returns the Light object that is bound to the indicated id, or NULL if no Light is bound.

PlaneNodeget_clip_plane (int plane_id) const
 Returns the PlaneNode object that is bound to the indicated id, or NULL if no PlaneNode is bound.

virtual void enable_clip_planes (bool enable)
 Intended to be overridden by a derived class to enable or disable the use of clipping planes overall.

bool mark_prepared_texture (TextureContext *tc)
 This is intended to be called from within prepare_texture().

bool unmark_prepared_texture (TextureContext *tc)
 This is intended to be called from within release_texture().

bool mark_prepared_geom (GeomContext *gc)
 This is intended to be called from within prepare_geom().

bool unmark_prepared_geom (GeomContext *gc)
 This is intended to be called from within release_geom().

bool mark_prepared_geom_node (GeomNodeContext *gnc)
 This is intended to be called from within prepare_geom_node().

bool unmark_prepared_geom_node (GeomNodeContext *gnc)
 This is intended to be called from within release_geom_node().

virtual void close_gsg ()
 This is called by the associated GraphicsWindow when close_window() is called.

void init_frame_pstats ()
void add_to_texture_record (TextureContext *)
void add_to_geom_record (GeomContext *)
void add_to_geom_node_record (GeomNodeContext *)
void record_state_change (TypeHandle)

Static Protected Member Functions

void report_errors_loop (int line, const char *source_file, GLenum error_code)
 The internal implementation of report_errors().

ConstPointerTo< RenderStateget_untextured_state ()
 Returns a RenderState object that represents texturing off.

ConstPointerTo< RenderStateget_unlit_state ()
ConstPointerTo< RenderStateget_unclipped_state ()

Protected Attributes

GLclampf _clear_color_red
GLclampf _clear_color_green
GLclampf _clear_color_blue
GLclampf _clear_color_alpha
GLclampd _clear_depth
GLint _clear_stencil
GLclampf _clear_accum_red
GLclampf _clear_accum_green
GLclampf _clear_accum_blue
GLclampf _clear_accum_alpha
GLenum _draw_buffer_mode
GLenum _read_buffer_mode
GLenum _shade_model_mode
GLint _scissor_x
GLint _scissor_y
GLsizei _scissor_width
GLsizei _scissor_height
GLint _viewport_x
GLint _viewport_y
GLsizei _viewport_width
GLsizei _viewport_height
GLboolean _lmodel_local
GLboolean _lmodel_twoside
GLfloat _line_width
GLfloat _point_size
GLenum _blend_source_func
GLenum _blend_dest_func
GLboolean _depth_mask
GLint _fog_mode
GLfloat _fog_start
GLfloat _fog_end
GLfloat _fog_density
Colorf _fog_color
GLenum _alpha_func
GLclampf _alpha_func_ref
GLenum _polygon_mode
GLint _pack_alignment
GLint _unpack_alignment
bool _multisample_enabled
bool _line_smooth_enabled
bool _point_smooth_enabled
bool _scissor_enabled
bool _texturing_enabled
bool _stencil_test_enabled
bool _multisample_alpha_one_enabled
bool _multisample_alpha_mask_enabled
bool _blend_enabled
bool _depth_test_enabled
bool _fog_enabled
bool _alpha_test_enabled
bool _polygon_offset_enabled
int _decal_level
bool _dithering_enabled
int _max_lights
int _max_clip_planes
LMatrix4f _current_projection_mat
int _projection_mat_stack_count
ConstPointerTo< DisplayRegion_actual_display_region
int _pass_number
PointerTo< SceneSetup_scene_setup
ConstPointerTo< RenderState_state
ConstPointerTo< TransformState_transform
int _buffer_mask
Colorf _color_clear_value
float _depth_clear_value
bool _stencil_clear_value
Colorf _accum_clear_value
int _clear_buffer_type
int _display_region_stack_level
int _frame_buffer_stack_level
int _lens_stack_level
ConstPointerTo< DisplayRegion_current_display_region
ConstPointerTo< Lens_current_lens
bool _normals_enabled
CoordinateSystem _coordinate_system
Colorf _scene_graph_color
bool _has_scene_graph_color
bool _scene_graph_color_stale
bool _vertex_colors_enabled
bool _lighting_enabled
bool _clip_planes_enabled
int _color_transform_enabled
LVecBase4f _current_color_offset
LVecBase4f _current_color_scale
ColorWriteAttrib::Mode _color_write_mode
ColorBlendAttrib::Mode _color_blend_mode
TransparencyAttrib::Mode _transparency_mode
bool _needs_reset
bool _closing_gsg

Static Private Attributes

TypeHandle _type_handle

Detailed Description

A GraphicsStateGuardian specialized for rendering into OpenGL contexts.

There should be no GL calls outside of this object.

Definition at line 72 of file glGraphicsStateGuardian.h.


Member Enumeration Documentation

enum GraphicsStateGuardian::ColorTransform [protected, inherited]
 

Enumeration values:
CT_offset 
CT_scale 

Definition at line 268 of file graphicsStateGuardian.h.


Constructor & Destructor Documentation

GLGraphicsStateGuardian::GLGraphicsStateGuardian const FrameBufferProperties properties  ) 
 

Definition at line 179 of file glGraphicsStateGuardian.cxx.

GLGraphicsStateGuardian::~GLGraphicsStateGuardian  )  [virtual]
 

Definition at line 192 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_buffer_mask, GLboolean(), RenderBuffer::T_accum, RenderBuffer::T_color, RenderBuffer::T_depth, and RenderBuffer::T_stencil.


Member Function Documentation

void GraphicsStateGuardian::add_to_geom_node_record GeomNodeContext  )  [inline, protected, inherited]
 

Definition at line 228 of file graphicsStateGuardian.h.

Referenced by prepare_geom_node().

void GraphicsStateGuardian::add_to_geom_record GeomContext  )  [inline, protected, inherited]
 

Definition at line 227 of file graphicsStateGuardian.h.

void GraphicsStateGuardian::add_to_texture_record TextureContext  )  [inline, protected, inherited]
 

Definition at line 226 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian8::draw_sphere().

void GLGraphicsStateGuardian::apply_fog Fog fog  ) 
 

Definition at line 2228 of file glGraphicsStateGuardian.cxx.

References ColorWriteAttrib::get_mode(), GraphicsStateGuardian::issue_color_write(), ColorWriteAttrib::M_off, ColorWriteAttrib::Mode, and report_gl_errors.

void GLGraphicsStateGuardian::apply_material const Material material  )  [virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 2180 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::apply_texture TextureContext tc  )  [virtual]
 

Makes the texture the currently available texture for rendering.

Reimplemented from GraphicsStateGuardian.

Definition at line 1696 of file glGraphicsStateGuardian.cxx.

bool GLGraphicsStateGuardian::apply_texture_immediate Texture tex  )  [protected]
 

Sends the texture image to GL.

This can be used to render a texture in immediate mode, or as part of the process of creating a GL texture object.

The return value is true if successful, or false if the texture has no image.

Definition at line 3054 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::begin_bind_clip_planes  )  [protected, virtual]
 

Called immediately before bind_clip_plane() is called, this is intended to provide the derived class a hook in which to set up some state (like transform) that might apply to several clip_planes.

The sequence is: begin_bind_clip_planes() will be called, then one or more bind_clip_plane() calls, then end_bind_clip_planes().

Reimplemented from GraphicsStateGuardian.

Definition at line 3958 of file glGraphicsStateGuardian.cxx.

References Filename::empty(), format_string(), Filename::get_basename_wo_extension(), get_external_image_format(), PixelBuffer::get_format(), PixelBuffer::get_image_type(), get_image_type(), Namable::get_name(), Texture::get_ram_image(), PixelBuffer::get_xsize(), PixelBuffer::get_ysize(), nassertv, NULL, pb, set_pack_alignment(), and tex.

void GLGraphicsStateGuardian::begin_bind_lights  )  [protected, virtual]
 

Called immediately before bind_light() is called, this is intended to provide the derived class a hook in which to set up some state (like transform) that might apply to several lights.

The sequence is: begin_bind_lights() will be called, then one or more bind_light() calls, then end_bind_lights().

Reimplemented from GraphicsStateGuardian.

Definition at line 3846 of file glGraphicsStateGuardian.cxx.

References Texture::_pbuffer, build_phony_mipmap_level(), Namable::get_name(), PixelBuffer::get_xsize(), PixelBuffer::get_ysize(), pb, and tex.

ConstPointerTo< RenderState > GraphicsStateGuardian::begin_decal_base_first  )  [virtual, inherited]
 

Called during draw to begin a three-step rendering phase to draw decals.

The first step, begin_decal_base_first(), is called prior to drawing the base geometry. It should set up whatever internal state is appropriate, as well as returning a RenderState object that should be applied to the base geometry for rendering.

Implements GraphicsStateGuardianBase.

Definition at line 714 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_has_scene_graph_color, GraphicsStateGuardian::_scene_graph_color_stale, GraphicsStateGuardian::_vertex_colors_enabled, and ColorAttrib::T_vertex.

ConstPointerTo< RenderState > GraphicsStateGuardian::begin_decal_base_second  )  [virtual, inherited]
 

Called during draw to begin a three-step rendering phase to draw decals.

The third step, begin_decal_base_second(), is called after drawing the base geometry and the nested decal geometry, and prior to drawing the base geometry one more time (if needed).

It should return a RenderState object appropriate for rendering the base geometry the second time, or NULL if it is not necessary to re-render the base geometry.

Implements GraphicsStateGuardianBase.

Definition at line 785 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_light_info, and GraphicsStateGuardian::enable_light().

ConstPointerTo< RenderState > GraphicsStateGuardian::begin_decal_nested  )  [virtual, inherited]
 

Called during draw to begin a three-step rendering phase to draw decals.

The second step, begin_decal_nested(), is called after drawing the base geometry and prior to drawing any of the nested decal geometry that is to be applied to the base geometry.

Implements GraphicsStateGuardianBase.

Definition at line 744 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_light_info, GraphicsStateGuardian::_lighting_enabled, GraphicsStateGuardian::_lighting_enabled_this_frame, Colorf, GraphicsStateGuardian::enable_lighting(), AmbientLight::get_class_type(), Light::get_color(), LightAttrib::get_light(), LightAttrib::get_num_lights(), LightAttrib::get_operation(), Light::get_type(), nassertv, NULL, and LightAttrib::O_remove.

bool GLGraphicsStateGuardian::begin_frame  )  [virtual]
 

Called before each frame is rendered, to allow the GSG a chance to do any internal cleanup before beginning the frame.

The return value is true if successful (in which case the frame will be drawn and end_frame() will be called later), or false if unsuccessful (in which case nothing will be drawn and end_frame() will not be called).

Reimplemented from GraphicsStateGuardian.

Definition at line 559 of file glGraphicsStateGuardian.cxx.

References issue_color_gl().

bool GraphicsStateGuardian::begin_scene  )  [virtual, inherited]
 

Called between begin_frame() and end_frame() to mark the beginning of drawing commands for a "scene" (usually a particular DisplayRegion) within a frame.

All 3-D drawing commands, except the clear operation, must be enclosed within begin_scene() .. end_scene().

The return value is true if successful (in which case the scene will be drawn and end_scene() will be called later), or false if unsuccessful (in which case nothing will be drawn and end_scene() will not be called).

Reimplemented in DXGraphicsStateGuardian7, and DXGraphicsStateGuardian8.

Definition at line 595 of file graphicsStateGuardian.cxx.

References CPT, ColorWriteAttrib::M_off, ColorWriteAttrib::make(), RenderState::make(), and NULL.

Referenced by DXGraphicsStateGuardian8::issue_depth_offset().

void GLGraphicsStateGuardian::bind_clip_plane PlaneNode plane,
int  plane_id
[protected, virtual]
 

Called the first time a particular clip_plane has been bound to a given id within a frame, this should set up the associated hardware clip_plane with the clip_plane's properties.

Reimplemented from GraphicsStateGuardian.

Definition at line 3986 of file glGraphicsStateGuardian.cxx.

References nout, and pb.

void GLGraphicsStateGuardian::bind_light Spotlight light,
int  light_id
[virtual]
 

Called the first time a particular light has been bound to a given id within a frame, this should set up the associated hardware light with the light's properties.

Reimplemented from GraphicsStateGuardian.

Definition at line 2639 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::bind_light DirectionalLight light,
int  light_id
[virtual]
 

Called the first time a particular light has been bound to a given id within a frame, this should set up the associated hardware light with the light's properties.

Reimplemented from GraphicsStateGuardian.

Definition at line 2591 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::bind_light PointLight light,
int  light_id
[virtual]
 

Called the first time a particular light has been bound to a given id within a frame, this should set up the associated hardware light with the light's properties.

Reimplemented from GraphicsStateGuardian.

Definition at line 2544 of file glGraphicsStateGuardian.cxx.

References CoordinateSystem, and CS_yup_right.

void GLGraphicsStateGuardian::bind_texture TextureContext tc  )  [protected]
 

Definition at line 2920 of file glGraphicsStateGuardian.cxx.

References TextureContext::_texture, CPT, CullFaceAttrib::M_cull_none, TextureApplyAttrib::M_decal, RenderModeAttrib::M_filled, RenderAttrib::M_none, DepthWriteAttrib::M_off, ColorWriteAttrib::M_on, RenderModeAttrib::make(), ColorWriteAttrib::make(), TextureApplyAttrib::make(), DepthWriteAttrib::make(), DepthTestAttrib::make(), CullFaceAttrib::make(), nassertv, NULL, prepare_display_region(), GraphicsStateGuardian::push_display_region(), and tex.

void GLGraphicsStateGuardian::build_phony_mipmap_level int  level,
int  xsize,
int  ysize
[protected]
 

Generates a single colored mipmap level.

Definition at line 4289 of file glGraphicsStateGuardian.cxx.

Referenced by begin_bind_lights().

void GLGraphicsStateGuardian::build_phony_mipmaps Texture tex  )  [protected]
 

Generates a series of colored mipmap levels to aid in visualizing the mipmap levels as the hardware applies them.

Definition at line 4243 of file glGraphicsStateGuardian.cxx.

Referenced by set_read_buffer().

void GLGraphicsStateGuardian::call_glAlphaFunc GLenum  func,
GLclampf  ref
[inline, protected]
 

Definition at line 614 of file glGraphicsStateGuardian.I.

Referenced by issue_tex_matrix().

void GLGraphicsStateGuardian::call_glBlendFunc GLenum  sfunc,
GLenum  dfunc
[inline, protected]
 

Definition at line 419 of file glGraphicsStateGuardian.I.

Referenced by print_gfx_visual().

void GLGraphicsStateGuardian::call_glClearAccum GLclampf  red,
GLclampf  green,
GLclampf  blue,
GLclampf  alpha
[inline, protected]
 

Definition at line 119 of file glGraphicsStateGuardian.I.

References _draw_buffer_mode, and INLINE.

void GLGraphicsStateGuardian::call_glClearColor GLclampf  red,
GLclampf  green,
GLclampf  blue,
GLclampf  alpha
[inline, protected]
 

Definition at line 62 of file glGraphicsStateGuardian.I.

References _clear_depth, and INLINE.

void GLGraphicsStateGuardian::call_glClearDepth GLclampd  depth  )  [inline, protected]
 

Definition at line 84 of file glGraphicsStateGuardian.I.

References _clear_stencil, and INLINE.

void GLGraphicsStateGuardian::call_glClearStencil GLint  s  )  [inline, protected]
 

Definition at line 104 of file glGraphicsStateGuardian.I.

References _clear_accum_alpha, _clear_accum_blue, _clear_accum_green, and _clear_accum_red.

void GLGraphicsStateGuardian::call_glClipPlane GLenum  plane,
const double  equation[4]
[inline, protected]
 

void GLGraphicsStateGuardian::call_glCullFace GLenum  mode  )  [inline, protected]
 

void GLGraphicsStateGuardian::call_glDrawBuffer GLenum  mode  )  [inline, protected]
 

Definition at line 141 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::call_glFogColor const Colorf color  )  [inline, protected]
 

Definition at line 595 of file glGraphicsStateGuardian.I.

References _polygon_mode, and INLINE.

void GLGraphicsStateGuardian::call_glFogDensity GLfloat  density  )  [inline, protected]
 

Definition at line 576 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::call_glFogEnd GLfloat  end  )  [inline, protected]
 

Definition at line 557 of file glGraphicsStateGuardian.I.

References _alpha_func, _alpha_func_ref, and INLINE.

void GLGraphicsStateGuardian::call_glFogMode GLint  mode  )  [inline, protected]
 

Definition at line 501 of file glGraphicsStateGuardian.I.

References _fog_end, and INLINE.

void GLGraphicsStateGuardian::call_glFogStart GLfloat  start  )  [inline, protected]
 

Definition at line 538 of file glGraphicsStateGuardian.I.

References _fog_color, and INLINE.

void GLGraphicsStateGuardian::call_glLightModelLocal GLboolean  local  )  [inline, protected]
 

Definition at line 259 of file glGraphicsStateGuardian.I.

References INLINE.

void GLGraphicsStateGuardian::call_glLightModelTwoSide GLboolean  twoside  )  [inline, protected]
 

Definition at line 276 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::call_glLineWidth GLfloat  width  )  [inline, protected]
 

Definition at line 381 of file glGraphicsStateGuardian.I.

Referenced by draw_point().

void GLGraphicsStateGuardian::call_glPointSize GLfloat  size  )  [inline, protected]
 

Definition at line 400 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::call_glPolygonMode GLenum  mode  )  [inline, protected]
 

Definition at line 660 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::call_glReadBuffer GLenum  mode  )  [inline, protected]
 

Definition at line 189 of file glGraphicsStateGuardian.I.

References _scissor_height, _scissor_width, _scissor_x, _scissor_y, height, INLINE, width, x, and y.

void GLGraphicsStateGuardian::call_glScissor GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height
[inline, protected]
 

Definition at line 221 of file glGraphicsStateGuardian.I.

References _lmodel_local, and INLINE.

void GLGraphicsStateGuardian::call_glShadeModel GLenum  mode  )  [inline, protected]
 

Set the shading model to be either GL_FLAT or GL_SMOOTH.

Definition at line 206 of file glGraphicsStateGuardian.I.

References _viewport_height, _viewport_width, _viewport_x, _viewport_y, height, INLINE, width, x, and y.

Referenced by draw_point(), and draw_quad().

void GLGraphicsStateGuardian::call_glStencilFunc GLenum  func,
GLint  refval,
GLuint  mask
[inline, protected]
 

Definition at line 296 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::call_glStencilOp GLenum  fail,
GLenum  zfail,
GLenum  pass
[inline, protected]
 

Definition at line 342 of file glGraphicsStateGuardian.I.

References _line_width, and width.

void GLGraphicsStateGuardian::call_glViewport GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height
[inline, protected]
 

Definition at line 240 of file glGraphicsStateGuardian.I.

References _lmodel_twoside, and INLINE.

void GraphicsStateGuardian::clear DisplayRegion dr  )  [inline, inherited]
 

Clears the framebuffer within the indicated DisplayRegion, according to the flags indicated by the DisplayRegion object (inheriting from ClearableRegion).

Note that by default, a DisplayRegion does not have any clear flags set, in which case this function will do nothing.

Definition at line 146 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_state.

void GraphicsStateGuardian::clear ClearableRegion clearable  )  [inherited]
 

Clears the framebuffer within the current DisplayRegion, according to the flags indicated by the given ClearableRegion object.

Definition at line 445 of file graphicsStateGuardian.cxx.

Referenced by GraphicsStateGuardian::set_scene(), and GraphicsEngine::sync_frame().

void GraphicsStateGuardian::close_gsg  )  [protected, virtual, inherited]
 

This is called by the associated GraphicsWindow when close_window() is called.

It should null out the _win pointer and possibly free any open resources associated with the GSG.

Definition at line 1791 of file graphicsStateGuardian.cxx.

Referenced by GraphicsPipe::get_hw_channel().

float GLGraphicsStateGuardian::compute_distance_to const LPoint3f &  point  )  const [virtual]
 

This function may only be called during a render traversal; it will compute the distance to the indicated point, assumed to be in modelview coordinates, from the camera plane.

Implements GraphicsStateGuardianBase.

Definition at line 2758 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::copy_pixel_buffer PixelBuffer pb,
const DisplayRegion dr,
const RenderBuffer rb
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 2167 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::copy_pixel_buffer PixelBuffer pb,
const DisplayRegion dr
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 2077 of file glGraphicsStateGuardian.cxx.

Referenced by enable_lighting().

void GLGraphicsStateGuardian::copy_texture TextureContext tc,
const DisplayRegion dr,
const RenderBuffer rb
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 2005 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::copy_texture TextureContext tc,
const DisplayRegion dr
[virtual]
 

Copy the pixel region indicated by the display region from the framebuffer into texture memory.

Implements GraphicsStateGuardianBase.

Definition at line 1957 of file glGraphicsStateGuardian.cxx.

References get_external_image_format(), PixelBuffer::get_format(), PixelBuffer::get_image_type(), get_image_type(), DisplayRegion::get_region_pixels(), get_untextured_state(), PixelBuffer::get_xorg(), PixelBuffer::get_xsize(), PixelBuffer::get_yorg(), PixelBuffer::get_ysize(), GraphicsStateGuardian::modify_state(), nassertv, NULL, pb, and set_pack_alignment().

Referenced by enable_lighting().

bool GLGraphicsStateGuardian::depth_offset_decals  )  [virtual]
 

Returns true if this GSG can implement decals using a DepthOffsetAttrib, or false if that is unreliable and the three-step rendering process should be used instead.

Reimplemented from GraphicsStateGuardian.

Definition at line 2710 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::do_clear const RenderBuffer buffer  )  [virtual]
 

Clears all of the indicated buffers to their assigned colors.

Implements GraphicsStateGuardian.

Definition at line 377 of file glGraphicsStateGuardian.cxx.

References _depth_mask, DepthWriteAttrib::M_on, and DepthWriteAttrib::make().

void GLGraphicsStateGuardian::draw_geom_node GeomNode node,
const RenderState state,
GeomNodeContext gnc
[virtual]
 

Draws a GeomNode previously indicated by a call to prepare_geom_node().

Reimplemented from GraphicsStateGuardian.

Definition at line 1869 of file glGraphicsStateGuardian.cxx.

References pb, and tex.

void GLGraphicsStateGuardian::draw_line GeomLine geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 656 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::draw_linestrip GeomLinestrip geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 729 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::draw_pixel_buffer PixelBuffer pb,
const DisplayRegion dr,
const RenderBuffer rb
[protected]
 

Definition at line 3376 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::draw_pixel_buffer PixelBuffer pb,
const DisplayRegion dr
[protected]
 

Copies the indicated pixel buffer into the frame buffer in the given display region.

Definition at line 3252 of file glGraphicsStateGuardian.cxx.

References PixelBuffer::F_alpha, PixelBuffer::F_blue, PixelBuffer::F_luminance, PixelBuffer::F_luminance_alpha, PixelBuffer::F_luminance_alphamask, PixelBuffer::F_rgb, PixelBuffer::F_rgb12, PixelBuffer::F_rgb332, PixelBuffer::F_rgb5, PixelBuffer::F_rgb8, PixelBuffer::F_rgba, PixelBuffer::F_rgba12, PixelBuffer::F_rgba4, PixelBuffer::F_rgba5, PixelBuffer::F_rgba8, PixelBuffer::F_rgbm, and gl_supports_bgr.

void GLGraphicsStateGuardian::draw_point GeomPoint geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 594 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_color_transform_enabled, GraphicsStateGuardian::_draw_primitive_pcollector, GraphicsStateGuardian::_vertices_other_pcollector, PStatCollector::add_level(), call_glLineWidth(), call_glShadeModel(), G_COLOR, G_NORMAL, G_OVERALL, G_PER_PRIM, G_PER_VERTEX, Geom::get_binding(), Geom::get_num_prims(), Geom::get_num_vertices(), GeomLine::get_width(), GeomIssuer::issue_color(), GraphicsStateGuardian::issue_color(), issue_color_gl(), GeomIssuer::issue_normal(), issue_normal_gl(), issue_scene_graph_color(), GeomIssuer::issue_texcoord(), issue_texcoord_gl(), issue_transformed_color_gl(), GeomIssuer::issue_vertex(), issue_vertex_gl(), GeomIssuer::IssueColor, Geom::make_color_iterator(), Geom::make_normal_iterator(), Geom::make_texcoord_iterator(), Geom::make_vertex_iterator(), GraphicsStateGuardian::wants_colors(), and wants_normals().

void GLGraphicsStateGuardian::draw_polygon GeomPolygon geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 1105 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::draw_quad GeomQuad geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 1264 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_color_transform_enabled, GraphicsStateGuardian::_draw_primitive_pcollector, GraphicsStateGuardian::_vertices_tristrip_pcollector, PStatCollector::add_level(), call_glShadeModel(), G_COLOR, G_NORMAL, G_OVERALL, G_PER_COMPONENT, G_PER_PRIM, G_PER_VERTEX, Geom::get_binding(), Geom::get_lengths(), Geom::get_num_prims(), Geom::get_num_vertices(), GeomIssuer::issue_color(), GraphicsStateGuardian::issue_color(), issue_color_gl(), GeomIssuer::issue_normal(), issue_normal_gl(), issue_scene_graph_color(), GeomIssuer::issue_texcoord(), issue_texcoord_gl(), issue_transformed_color_gl(), GeomIssuer::issue_vertex(), issue_vertex_gl(), GeomIssuer::IssueColor, Geom::make_color_iterator(), Geom::make_normal_iterator(), Geom::make_texcoord_iterator(), Geom::make_vertex_iterator(), nassertv, PStatCollector::start(), GraphicsStateGuardian::wants_colors(), and wants_normals().

void GLGraphicsStateGuardian::draw_sphere GeomSphere geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 1537 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_draw_primitive_pcollector.

void GLGraphicsStateGuardian::draw_sprite GeomSprite geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 850 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_state, TransparencyAttrib::M_none, and NULL.

void GLGraphicsStateGuardian::draw_texture TextureContext tc,
const DisplayRegion dr,
const RenderBuffer rb
[protected]
 

Definition at line 3235 of file glGraphicsStateGuardian.cxx.

References PixelBuffer::F_color_index, PixelBuffer::F_depth_component, PixelBuffer::F_green, PixelBuffer::F_red, and PixelBuffer::F_stencil_index.

void GLGraphicsStateGuardian::draw_texture TextureContext tc,
const DisplayRegion dr
[protected]
 

Copies the texture image directly onto the frame buffer within the indicated display region.

Definition at line 3159 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::draw_tri GeomTri geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 1186 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::draw_trifan GeomTrifan geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 1438 of file glGraphicsStateGuardian.cxx.

References G_PER_COMPONENT, G_PER_VERTEX, GeomIssuer::issue_color(), GeomIssuer::issue_normal(), GeomIssuer::issue_texcoord(), and GeomIssuer::issue_vertex().

void GLGraphicsStateGuardian::draw_tristrip GeomTristrip geom,
GeomContext gc
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 1340 of file glGraphicsStateGuardian.cxx.

References G_PER_COMPONENT, G_PER_VERTEX, GeomIssuer::issue_color(), GeomIssuer::issue_normal(), GeomIssuer::issue_texcoord(), and GeomIssuer::issue_vertex().

void GLGraphicsStateGuardian::dump_state void   ) 
 

Definition at line 4456 of file glGraphicsStateGuardian.cxx.

References GL_CLAMP_TO_EDGE, GL_CONSTANT_ALPHA, GL_CONSTANT_COLOR, GL_MAX_3D_TEXTURE_SIZE, GL_ONE_MINUS_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_COLOR, GL_PACK_IMAGE_HEIGHT, GL_PACK_SKIP_IMAGES, GL_PROXY_TEXTURE_3D, GL_RESCALE_NORMAL, GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_DEPTH, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_MAX_LOD, GL_TEXTURE_MIN_LOD, GL_TEXTURE_WRAP_R, GL_UNPACK_IMAGE_HEIGHT, GL_UNPACK_SKIP_IMAGES, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_5_6_5, and GL_UNSIGNED_SHORT_5_6_5_REV.

void GLGraphicsStateGuardian::enable_alpha_test bool  val  )  [inline, protected]
 

Definition at line 997 of file glGraphicsStateGuardian.I.

Referenced by issue_tex_matrix().

void GLGraphicsStateGuardian::enable_blend bool  val  )  [inline, protected]
 

Definition at line 916 of file glGraphicsStateGuardian.I.

Referenced by print_gfx_visual().

void GLGraphicsStateGuardian::enable_clip_plane int  plane_id,
bool  enable
[protected, virtual]
 

Intended to be overridden by a derived class to enable the indicated clip_plane id.

A specific PlaneNode will already have been bound to this id via bind_clip_plane().

Reimplemented from GraphicsStateGuardian.

Definition at line 3927 of file glGraphicsStateGuardian.cxx.

References PNMImage::quick_filter_from().

void GraphicsStateGuardian::enable_clip_planes bool  enable  )  [protected, virtual, inherited]
 

Intended to be overridden by a derived class to enable or disable the use of clipping planes overall.

This is called by issue_clip_plane() according to whether any planes are in use or not.

Definition at line 1496 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_transform_state_pcollector, and PStatCollector::add_level().

Referenced by GraphicsStateGuardian::issue_color().

void GLGraphicsStateGuardian::enable_depth_test bool  val  )  [inline, protected]
 

Definition at line 943 of file glGraphicsStateGuardian.I.

Referenced by issue_transform().

void GLGraphicsStateGuardian::enable_fog bool  val  )  [inline, protected]
 

Definition at line 970 of file glGraphicsStateGuardian.I.

References INLINE.

void GLGraphicsStateGuardian::enable_light int  light_id,
bool  enable
[protected, virtual]
 

Intended to be overridden by a derived class to enable the indicated light id.

A specific Light will already have been bound to this id via bind_light().

Reimplemented from GraphicsStateGuardian.

Definition at line 3815 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::enable_lighting bool  enable  )  [protected, virtual]
 

Intended to be overridden by a derived class to enable or disable the use of lighting overall.

This is called by issue_light() according to whether any lights are in use or not.

Reimplemented from GraphicsStateGuardian.

Definition at line 3775 of file glGraphicsStateGuardian.cxx.

References RenderBuffer::_buffer_type, copy_pixel_buffer(), copy_texture(), PixelBuffer::depth_buffer(), DisplayRegion::get_pixel_height(), DisplayRegion::get_pixel_width(), RenderBuffer::T_back, and RenderBuffer::T_depth.

void GLGraphicsStateGuardian::enable_line_smooth bool  val  )  [inline, protected]
 

Definition at line 744 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::enable_multisample bool  val  )  [inline, protected]
 

Definition at line 719 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::enable_multisample_alpha_mask bool  val  )  [inline, protected]
 

Definition at line 887 of file glGraphicsStateGuardian.I.

References _fog_enabled.

Referenced by print_gfx_visual().

void GLGraphicsStateGuardian::enable_multisample_alpha_one bool  val  )  [inline, protected]
 

Definition at line 858 of file glGraphicsStateGuardian.I.

References _depth_test_enabled, and INLINE.

Referenced by print_gfx_visual().

void GraphicsStateGuardian::enable_normals bool  val  )  [inline, inherited]
 

Definition at line 119 of file graphicsStateGuardian.h.

References CoordinateSystem, and INLINE.

void GLGraphicsStateGuardian::enable_point_smooth bool  val  )  [inline, protected]
 

Definition at line 764 of file glGraphicsStateGuardian.I.

References _scissor_enabled, and INLINE.

void GLGraphicsStateGuardian::enable_polygon_offset bool  val  )  [inline, protected]
 

Definition at line 1025 of file glGraphicsStateGuardian.I.

Referenced by issue_texture_apply().

void GLGraphicsStateGuardian::enable_scissor bool  val  )  [inline, protected]
 

Definition at line 839 of file glGraphicsStateGuardian.I.

void GLGraphicsStateGuardian::enable_stencil_test bool  val  )  [inline, protected]
 

Definition at line 785 of file glGraphicsStateGuardian.I.

References GL_SAMPLE_ALPHA_TO_ONE_SGIS.

void GLGraphicsStateGuardian::enable_texturing bool  val  )  [inline, protected]
 

Definition at line 812 of file glGraphicsStateGuardian.I.

References GL_SAMPLE_ALPHA_TO_MASK_SGIS.

void GLGraphicsStateGuardian::end_bind_clip_planes  )  [protected, virtual]
 

Called after before bind_clip_plane() has been called one or more times (but before any geometry is issued or additional state is changed), this is intended to clean up any temporary changes to the state that may have been made by begin_bind_clip_planes().

Reimplemented from GraphicsStateGuardian.

Definition at line 4017 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::end_bind_lights  )  [protected, virtual]
 

Called after before bind_light() has been called one or more times (but before any geometry is issued or additional state is changed), this is intended to clean up any temporary changes to the state that may have been made by begin_bind_lights().

Reimplemented from GraphicsStateGuardian.

Definition at line 3876 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::end_frame  )  [virtual]
 

Called after each frame is rendered, to allow the GSG a chance to do any internal cleanup after rendering the frame, and before the window flips.

Reimplemented from GraphicsStateGuardian.

Definition at line 581 of file glGraphicsStateGuardian.cxx.

void GraphicsStateGuardian::end_scene  )  [virtual, inherited]
 

Called between begin_frame() and end_frame() to mark the end of drawing commands for a "scene" (usually a particular DisplayRegion) within a frame.

All 3-D drawing commands, except the clear operation, must be enclosed within begin_scene() .. end_scene().

Reimplemented in DXGraphicsStateGuardian7, and DXGraphicsStateGuardian8.

Definition at line 616 of file graphicsStateGuardian.cxx.

void GraphicsStateGuardian::finish_decal  )  [virtual, inherited]
 

Called during draw to clean up after decals are finished.

Implements GraphicsStateGuardianBase.

Definition at line 813 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_light_info.

virtual TypeHandle GLGraphicsStateGuardian::force_init_type void   )  [inline, virtual]
 

Reimplemented from GraphicsStateGuardian.

Reimplemented in glxGraphicsStateGuardian, and wglGraphicsStateGuardian.

Definition at line 335 of file glGraphicsStateGuardian.h.

void GLGraphicsStateGuardian::free_pointers  )  [protected, virtual]
 

Frees some memory that was explicitly allocated within the glgsg.

Reimplemented from GraphicsStateGuardian.

Definition at line 4141 of file glGraphicsStateGuardian.cxx.

TypeHandle GLGraphicsStateGuardian::get_class_type void   )  [static]
 

Reimplemented from GraphicsStateGuardian.

Reimplemented in glxGraphicsStateGuardian, and wglGraphicsStateGuardian.

Definition at line 4415 of file glGraphicsStateGuardian.cxx.

PlaneNode * GraphicsStateGuardian::get_clip_plane int  plane_id  )  const [inline, protected, inherited]
 

Returns the PlaneNode object that is bound to the indicated id, or NULL if no PlaneNode is bound.

Definition at line 552 of file graphicsStateGuardian.I.

GLenum GLGraphicsStateGuardian::get_clip_plane_id int  index  )  const [inline, protected]
 

Convert index to gl clip plane id.

Definition at line 1065 of file glGraphicsStateGuardian.I.

CoordinateSystem GraphicsStateGuardian::get_coordinate_system  )  const [inline, inherited]
 

Returns the coordinate system in effect on this particular gsg.

Normally, this will be the default coordinate system, but it might be set differently at runtime.

Definition at line 521 of file graphicsStateGuardian.I.

const DisplayRegion * GraphicsStateGuardian::get_current_display_region void   )  const [inline, inherited]
 

Returns the current display region being rendered to, as set by the last call to push_display_region() (or restored by pop_display_region()).

This display region will be made active (if it is not already) by a call to prepare_display_region().

Definition at line 269 of file graphicsStateGuardian.I.

References FrameBufferStack::_frame_buffer, GraphicsStateGuardian::_frame_buffer_stack_level, FrameBufferStack::_stack_level, and GraphicsStateGuardian::save_frame_buffer().

Referenced by PlanarReflector::init().

const Lens * GraphicsStateGuardian::get_current_lens  )  const [inline, inherited]
 

Returns the current lens being rendered with, as set by the last call to push_lens() (or restored by pop_lens()).

This lens will be made active (if it is not already) by a call to prepare_lens().

Definition at line 288 of file graphicsStateGuardian.I.

GLenum GLGraphicsStateGuardian::get_external_image_format PixelBuffer::Format  format  )  [protected]
 

Maps from the PixelBuffer's Format symbols to GL's.

Definition at line 3501 of file glGraphicsStateGuardian.cxx.

References get_light_id().

Referenced by begin_bind_clip_planes(), copy_texture(), and set_draw_buffer().

GLenum GLGraphicsStateGuardian::get_fog_mode_type Fog::Mode  m  )  const [protected]
 

Maps from the fog types to gl version.

Definition at line 3639 of file glGraphicsStateGuardian.cxx.

GLenum GLGraphicsStateGuardian::get_image_type PixelBuffer::Type  type  )  [protected]
 

Maps from the PixelBuffer's internal Type symbols to GL's.

Definition at line 3471 of file glGraphicsStateGuardian.cxx.

Referenced by begin_bind_clip_planes(), copy_texture(), and set_draw_buffer().

CoordinateSystem GLGraphicsStateGuardian::get_internal_coordinate_system  )  const [virtual]
 

Should be overridden by derived classes to return the coordinate system used internally by the GSG, if any one particular coordinate system is used.

The default, CS_default, indicates that the GSG can use any coordinate system.

If this returns other than CS_default, the GraphicsEngine will automatically convert all transforms into the indicated coordinate system.

Reimplemented from GraphicsStateGuardian.

Definition at line 2739 of file glGraphicsStateGuardian.cxx.

GLenum GLGraphicsStateGuardian::get_internal_image_format PixelBuffer::Format  format  )  [protected]
 

Maps from the PixelBuffer's Format symbols to a suitable internal format for GL textures.

Definition at line 3561 of file glGraphicsStateGuardian.cxx.

References _max_clip_planes.

Referenced by set_draw_buffer().

Light * GraphicsStateGuardian::get_light int  light_id  )  const [inline, protected, inherited]
 

Returns the Light object that is bound to the indicated id, or NULL if no Light is bound.

Definition at line 536 of file graphicsStateGuardian.I.

GLenum GLGraphicsStateGuardian::get_light_id int  index  )  const [inline, protected]
 

Convert index to gl light id.

Definition at line 1052 of file glGraphicsStateGuardian.I.

Referenced by get_external_image_format(), issue_alpha_test(), and issue_cull_face().

GraphicsPipe * GraphicsStateGuardian::get_pipe  )  const [inline, inherited]
 

Returns the graphics pipe on which this GSG was created.

Definition at line 78 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_scene_setup, and INLINE.

Referenced by GraphicsEngine::terminate_threads().

const FrameBufferProperties & GraphicsStateGuardian::get_properties  )  const [inline, inherited]
 

Returns the frame buffer properties requested for this GSG.

All windows created for this GSG must be created with the same properties.

Definition at line 63 of file graphicsStateGuardian.I.

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

Returns the current reference count.

Definition at line 183 of file referenceCount.I.

Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture().

RenderBuffer GraphicsStateGuardian::get_render_buffer int  buffer_type  )  [inherited]
 

Returns a RenderBuffer object suitable for operating on the requested set of buffers.

buffer_type is the union of all the desired RenderBuffer::Type values.

Definition at line 170 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_prepared_textures.

Referenced by CRGraphicsStateGuardian::release_geom_node().

SceneSetup * GraphicsStateGuardian::get_scene  )  const [inline, inherited]
 

Returns the SceneSetup object.

Definition at line 123 of file graphicsStateGuardian.I.

References INLINE, and GraphicsStateGuardian::reset().

GLint GLGraphicsStateGuardian::get_texture_apply_mode_type TextureApplyAttrib::Mode  am  )  const [protected]
 

Maps from the texture environment's mode types to the corresponding OpenGL ids.

Definition at line 3617 of file glGraphicsStateGuardian.cxx.

GLenum GLGraphicsStateGuardian::get_texture_filter_type Texture::FilterType  ft  )  [protected]
 

Maps from the Texture's internal filter type symbols to GL's.

Definition at line 3424 of file glGraphicsStateGuardian.cxx.

GLenum GLGraphicsStateGuardian::get_texture_wrap_mode Texture::WrapMode  wm  )  [protected]
 

Maps from the Texture's internal wrap mode symbols to GL's.

Definition at line 3393 of file glGraphicsStateGuardian.cxx.

const GraphicsThreadingModel & GraphicsStateGuardian::get_threading_model  )  const [inline, inherited]
 

Returns the threading model that was used to create this GSG.

Definition at line 93 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_scene_setup, and INLINE.

TypeHandle GLGraphicsStateGuardian::get_type void   )  const [virtual]
 

Reimplemented from GraphicsStateGuardian.

Reimplemented in glxGraphicsStateGuardian, and wglGraphicsStateGuardian.

Definition at line 4411 of file glGraphicsStateGuardian.cxx.

int TypedObject::get_type_index  )  const [inline, inherited]
 

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 71 of file typedObject.I.

References TypeHandle::get_name(), TypedObject::get_type(), and INLINE.

ConstPointerTo< RenderState > GraphicsStateGuardian::get_unclipped_state  )  [static, protected, inherited]
 

Definition at line 1969 of file graphicsStateGuardian.cxx.

Referenced by GraphicsStateGuardian::set_depth_clear_value().

ConstPointerTo< RenderState > GraphicsStateGuardian::get_unlit_state  )  [static, protected, inherited]
 

Definition at line 1952 of file graphicsStateGuardian.cxx.

ConstPointerTo< RenderState > GLGraphicsStateGuardian::get_untextured_state  )  [static, protected]
 

Returns a RenderState object that represents texturing off.

Reimplemented from GraphicsStateGuardian.

Definition at line 4221 of file glGraphicsStateGuardian.cxx.

Referenced by copy_texture().

void GraphicsStateGuardian::init_frame_pstats  )  [inline, protected, inherited]
 

Definition at line 225 of file graphicsStateGuardian.h.

void GLGraphicsStateGuardian::init_type void   )  [static]
 

Reimplemented from GraphicsStateGuardian.

Reimplemented in glxGraphicsStateGuardian, and wglGraphicsStateGuardian.

Definition at line 4419 of file glGraphicsStateGuardian.cxx.

Referenced by ConfigureFn().

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is the indicated type exactly.

Definition at line 101 of file typedObject.I.

Referenced by PT(), and CollisionNode::xform().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

void GLGraphicsStateGuardian::issue_alpha_test const AlphaTestAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2425 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_scene_setup, Colorf, Light::get_color(), DirectionalLight::get_direction(), get_light_id(), NodePath::get_mat(), and DirectionalLight::get_specular_color().

void GraphicsStateGuardian::issue_clip_plane const ClipPlaneAttrib attrib  )  [virtual, inherited]
 

This is fundametically similar to issue_light(), with calls to slot_new_clip_plane(), apply_clip_plane(), and enable_clip_planes(), as appropriate.

Reimplemented from GraphicsStateGuardianBase.

Definition at line 1158 of file graphicsStateGuardian.cxx.

void GraphicsStateGuardian::issue_color const ColorAttrib attrib  )  [virtual, inherited]
 

This method is defined in the base class because it is likely that this functionality will be used for all (or at least most) kinds of GraphicsStateGuardians--it's not specific to any one rendering backend.

The ColorAttribute just changes the interpretation of the color on the vertices, and fiddles with _vertex_colors_enabled, etc.

Reimplemented from GraphicsStateGuardianBase.

Definition at line 905 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_clip_plane_info, GraphicsStateGuardian::_clip_planes_enabled, GraphicsStateGuardian::_clip_planes_enabled_this_frame, GraphicsStateGuardian::enable_clip_plane(), GraphicsStateGuardian::enable_clip_planes(), ClipPlaneAttrib::get_num_planes(), ClipPlaneAttrib::get_operation(), ClipPlaneAttrib::get_plane(), ClipPlaneAttrib::has_plane(), nassertv, NULL, ClipPlaneAttrib::O_remove, and GraphicsStateGuardian::slot_new_clip_plane().

Referenced by draw_point(), draw_quad(), and CRGraphicsStateGuardian::prepare_lens().

void GraphicsStateGuardian::issue_color_blend const ColorBlendAttrib attrib  )  [virtual, inherited]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 1140 of file graphicsStateGuardian.cxx.

void GraphicsStateGuardian::issue_color_scale const ColorScaleAttrib attrib  )  [virtual, inherited]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 868 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::end_bind_lights().

void GLGraphicsStateGuardian::issue_color_write const ColorWriteAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardian.

Definition at line 2373 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::issue_cull_face const CullFaceAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2462 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_scene_setup, Colorf, Spotlight::get_attenuation(), Light::get_color(), Spotlight::get_exponent(), Lens::get_hfov(), LensNode::get_lens(), get_light_id(), NodePath::get_mat(), Lens::get_nodal_point(), Spotlight::get_specular_color(), Lens::get_view_vector(), nassertv, and NULL.

void GLGraphicsStateGuardian::issue_depth_offset const DepthOffsetAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2513 of file glGraphicsStateGuardian.cxx.

References _texturing_enabled.

void GLGraphicsStateGuardian::issue_depth_test const DepthTestAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2406 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::issue_depth_write const DepthWriteAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2444 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::issue_fog const FogAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2493 of file glGraphicsStateGuardian.cxx.

void GraphicsStateGuardian::issue_light const LightAttrib attrib  )  [virtual, inherited]
 

The default implementation of issue_light() assumes we have a limited number of hardware lights available.

This function assigns each light to a different hardware light id, trying to keep each light associated with the same id where possible, but reusing id's when necessary. When it is no longer possible to reuse existing id's (e.g. all id's are in use), slot_new_light() is called to prepare the next sequential light id.

It will call apply_light() each time a light is assigned to a particular id for the first time in a given frame, and it will subsequently call enable_light() to enable or disable each light as the frame is rendered, as well as enable_lighting() to enable or disable overall lighting.

If this model of hardware lights with id's does not apply to a particular graphics engine, it should override this function to do something more appropriate instead.

Reimplemented from GraphicsStateGuardianBase.

Definition at line 983 of file graphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::issue_material const MaterialAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2311 of file glGraphicsStateGuardian.cxx.

References CullFaceAttrib::get_effective_mode(), CullFaceAttrib::M_cull_clockwise, CullFaceAttrib::M_cull_counter_clockwise, CullFaceAttrib::M_cull_none, and CullFaceAttrib::Mode.

void GLGraphicsStateGuardian::issue_render_mode const RenderModeAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2331 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::issue_scene_graph_color  )  [inline, protected]
 

Checks whether the scene graph color needs to be issued, and sends the appropriate glColor command if it does.

Definition at line 1082 of file glGraphicsStateGuardian.I.

Referenced by draw_point(), and draw_quad().

virtual void GraphicsStateGuardianBase::issue_stencil const StencilAttrib *   )  [inline, virtual, inherited]
 

Definition at line 204 of file graphicsStateGuardianBase.h.

virtual void GraphicsStateGuardianBase::issue_tex_gen const TexGenAttrib *   )  [inline, virtual, inherited]
 

Definition at line 203 of file graphicsStateGuardianBase.h.

void GLGraphicsStateGuardian::issue_tex_matrix const TexMatrixAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2277 of file glGraphicsStateGuardian.cxx.

References call_glAlphaFunc(), enable_alpha_test(), AlphaTestAttrib::get_mode(), AlphaTestAttrib::get_reference_alpha(), RenderAttrib::M_never, RenderAttrib::M_none, PANDA_TO_GL_COMPAREFUNC, and RenderAttrib::PandaCompareFunc.

void GLGraphicsStateGuardian::issue_texture const TextureAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2291 of file glGraphicsStateGuardian.cxx.

References DepthWriteAttrib::get_mode(), DepthWriteAttrib::M_off, DepthWriteAttrib::Mode, and report_gl_errors.

void GLGraphicsStateGuardian::issue_texture_apply const TextureApplyAttrib attrib  )  [virtual]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 2359 of file glGraphicsStateGuardian.cxx.

References enable_polygon_offset(), and DepthOffsetAttrib::get_offset().

void GLGraphicsStateGuardian::issue_transform const TransformState transform  )  [virtual]
 

Sends the indicated transform matrix to the graphics API to be applied to future vertices.

Reimplemented from GraphicsStateGuardian.

Definition at line 2258 of file glGraphicsStateGuardian.cxx.

References enable_depth_test(), DepthTestAttrib::get_mode(), RenderAttrib::M_none, PANDA_TO_GL_COMPAREFUNC, RenderAttrib::PandaCompareFunc, and report_gl_errors.

void GLGraphicsStateGuardian::issue_transformed_color const Colorf color  )  const
 

Transform the color by the current color matrix, and calls the appropriate glColor function.

Definition at line 3721 of file glGraphicsStateGuardian.cxx.

References TransparencyAttrib::M_dual, TransparencyAttrib::M_multisample, and TransparencyAttrib::M_multisample_mask.

void GraphicsStateGuardian::issue_transparency const TransparencyAttrib attrib  )  [virtual, inherited]
 

Reimplemented from GraphicsStateGuardianBase.

Definition at line 1127 of file graphicsStateGuardian.cxx.

GraphicsStateGuardian* GLGraphicsStateGuardian::make_GlGraphicsStateGuardian const FactoryParams params  )  [static]
 

bool GraphicsStateGuardian::mark_prepared_geom GeomContext gc  )  [protected, inherited]
 

This is intended to be called from within prepare_geom().

It adds the indicated GeomContext pointer to the _prepared_geoms set, and returns true if it was successfully added (i.e. it was not already in the set).

Definition at line 1671 of file graphicsStateGuardian.cxx.

bool GraphicsStateGuardian::mark_prepared_geom_node GeomNodeContext gnc  )  [protected, inherited]
 

This is intended to be called from within prepare_geom_node().

It adds the indicated GeomNodeContext pointer to the _prepared_geom_nodes set, and returns true if it was successfully added (i.e. it was not already in the set).

Definition at line 1725 of file graphicsStateGuardian.cxx.

bool GraphicsStateGuardian::mark_prepared_texture TextureContext tc  )  [protected, inherited]
 

This is intended to be called from within prepare_texture().

It adds the indicated TextureContext pointer to the _prepared_textures set, and returns true if it was successfully added (i.e. it was not already in the set).

Definition at line 1617 of file graphicsStateGuardian.cxx.

Referenced by RIBGraphicsStateGuardian::draw_sprite().

void GraphicsStateGuardian::modify_state const RenderState state  )  [inline, inherited]
 

Applies the attributes indicated in the state set to the current state, and issues the changes to the graphics hardware.

Any transitions not mentioned are left unchanged.

Definition at line 187 of file graphicsStateGuardian.I.

Referenced by copy_texture(), and GraphicsStateGuardian::set_depth_clear_value().

void GraphicsStateGuardian::pop_display_region DisplayRegionStack node  )  [inline, inherited]
 

Restores the display region previously in effect, before the matching call to push_display_region().

The newly-restored display region will not actually be made active for rendering until the next call to prepare_display_region(). This is a state-changing optimization.

Definition at line 347 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_current_lens, and GraphicsStateGuardian::prepare_lens().

Referenced by GraphicsStateGuardian::set_scene().

void GraphicsStateGuardian::pop_frame_buffer FrameBufferStack node  )  [inline, inherited]
 

Restores the contents of the frame buffer as saved by a previous call to push_frame_buffer().

Definition at line 392 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_clip_plane_info, INLINE, nassertr, and NULL.

void GraphicsStateGuardian::pop_lens LensStack stack  )  [inline, inherited]
 

Restores the lens previously in effect, before the matching call to push_lens().

The newly-restored lens will not actually be made active for rendering until the next call to prepare_lens(). This is a state-changing optimization.

Definition at line 453 of file graphicsStateGuardian.I.

void GLGraphicsStateGuardian::prepare_display_region  )  [virtual]
 

Prepare a display region for rendering (set up scissor region and viewport).

Implements GraphicsStateGuardian.

Definition at line 453 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_current_lens, CS_yup_right, NULL, and report_gl_errors.

Referenced by bind_texture().

GeomContext * GraphicsStateGuardian::prepare_geom Geom geom  )  [virtual, inherited]
 

Prepares the indicated Geom for retained-mode rendering.

The value returned by this function will be passed back into future calls to draw_tristrip(), etc., along with the Geom pointer.

Implements GraphicsStateGuardianBase.

Definition at line 365 of file graphicsStateGuardian.cxx.

References RenderBuffer::T_depth.

GeomNodeContext * GLGraphicsStateGuardian::prepare_geom_node GeomNode node  )  [virtual]
 

Prepares the indicated GeomNode for retained-mode rendering.

If this function returns non-NULL, the value returned will be passed back to a future call to draw_geom_node(), which is expected to draw the contents of the node.

Reimplemented from GraphicsStateGuardian.

Definition at line 1768 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_draw_primitive_pcollector, GLGeomNodeContext::_dynamic_geoms, GLGeomNodeContext::_index, _vertices_display_list_pcollector, PStatCollector::add_level(), GraphicsStateGuardian::add_to_geom_node_record(), DCAST, Geom::draw(), GeomNode::get_geom(), GeomNode::get_num_geoms(), and NULL.

bool GLGraphicsStateGuardian::prepare_lens  )  [virtual]
 

Makes the current lens (whichever lens was most recently specified with push_lens()) active, so that it will transform future rendered geometry.

Normally this is only called from the draw process, and usually it is called immediately after a call to push_lens().

The return value is true if the lens is acceptable, false if it is not.

Reimplemented from GraphicsStateGuardian.

Definition at line 501 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::begin_frame(), and report_gl_errors.

TextureContext * GLGraphicsStateGuardian::prepare_texture Texture tex  )  [virtual]
 

Creates a new retained-mode representation of the given texture, and returns a newly-allocated TextureContext pointer to reference it.

It is the responsibility of the calling function to later call release_texture() with this same pointer (which will also delete the pointer).

Reimplemented from GraphicsStateGuardian.

Definition at line 1636 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_closing_gsg, and tex.

void GLGraphicsStateGuardian::print_gfx_visual  ) 
 

Prints a description of the current visual selected.

Definition at line 3665 of file glGraphicsStateGuardian.cxx.

References call_glBlendFunc(), enable_blend(), enable_multisample_alpha_mask(), enable_multisample_alpha_one(), ColorBlendAttrib::M_add, TransparencyAttrib::M_alpha, TransparencyAttrib::M_alpha_sorted, TransparencyAttrib::M_binary, ColorBlendAttrib::M_multiply, ColorBlendAttrib::M_multiply_add, TransparencyAttrib::M_none, ColorBlendAttrib::M_none, and ColorWriteAttrib::M_off.

DisplayRegionStack GraphicsStateGuardian::push_display_region const DisplayRegion dr  )  [inline, inherited]
 

Saves the current display region information and sets up a new display region for rendering.

The return value from this function must eventually be passed to a matching pop_display_region() call.

The new display region will not actually be made active for rendering until the next call to prepare_display_region(). This is a state-changing optimization.

Definition at line 317 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_current_lens, GraphicsStateGuardian::_lens_stack_level, LensStack::_stack_level, INLINE, and nassertv.

Referenced by bind_texture(), and GraphicsStateGuardian::set_scene().

FrameBufferStack GraphicsStateGuardian::push_frame_buffer const RenderBuffer buffer,
const DisplayRegion dr
[inline, inherited]
 

Saves the contents of the frame buffer (within the indicated display region only) so that rendering may be performed (for instance, to render a partial in a multipass algorithm) and the frame buffer later restored via a matching call to pop_frame_buffer().

Definition at line 372 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_coordinate_system, CoordinateSystem, and INLINE.

Referenced by release_geom_node(), and CRGraphicsStateGuardian::release_geom_node().

LensStack GraphicsStateGuardian::push_lens const Lens lens  )  [inline, inherited]
 

Saves the current lens information and sets up a new lens for rendering.

The return value from this function must eventually be passed to a matching pop_lens() call.

The new lens will not actually be made active for rendering until the next call to prepare_lens(). This is a state-changing optimization.

Definition at line 423 of file graphicsStateGuardian.I.

void GraphicsStateGuardian::record_state_change TypeHandle   )  [inline, protected, inherited]
 

Definition at line 229 of file graphicsStateGuardian.h.

References Colorf.

int ReferenceCount::ref  )  const [inline, inherited]
 

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 225 of file referenceCount.I.

Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering().

void GraphicsStateGuardian::release_all_geoms  )  [inherited]
 

Frees the resources for all Geoms and GeomNodes associated with this GSG.

Warning! This may make the Geoms unrenderable, if the Panda-level information has been deleted.

Definition at line 218 of file graphicsStateGuardian.cxx.

References NULL.

void GraphicsStateGuardian::release_all_textures  )  [inherited]
 

Frees the resources for all textures associated with this GSG.

Definition at line 185 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_prepared_geom_nodes, GraphicsStateGuardian::_prepared_geoms, nassertv, GraphicsStateGuardian::release_geom(), and GraphicsStateGuardian::release_geom_node().

void GraphicsStateGuardian::release_geom GeomContext gc  )  [virtual, inherited]
 

Frees the resources previously allocated via a call to prepare_geom(), including deleting the GeomContext itself, if necessary.

Implements GraphicsStateGuardianBase.

Definition at line 382 of file graphicsStateGuardian.cxx.

Referenced by GraphicsStateGuardian::release_all_textures().

void GLGraphicsStateGuardian::release_geom_node GeomNodeContext gnc  )  [virtual]
 

Frees the resources previously allocated via a call to prepare_geom_node(), including deleting the GeomNodeContext itself, if necessary.

Reimplemented from GraphicsStateGuardian.

Definition at line 1913 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::push_frame_buffer().

void GLGraphicsStateGuardian::release_texture TextureContext tc  )  [virtual]
 

Frees the GL resources previously allocated for the texture.

Reimplemented from GraphicsStateGuardian.

Definition at line 1726 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::report_errors int  line,
const char *  source_file
[inline, static]
 

Checks for any outstanding error codes and outputs them, if found.

If NDEBUG is defined, this function does nothing.

This is a static method so it can be called when there's no gsg pointer around.

Definition at line 45 of file glGraphicsStateGuardian.I.

References _clear_color_alpha, _clear_color_blue, _clear_color_green, _clear_color_red, and INLINE.

void GLGraphicsStateGuardian::report_errors_loop int  line,
const char *  source_file,
GLenum  error_code
[static, protected]
 

The internal implementation of report_errors().

Don't call this function; use report_errors() instead.

Definition at line 2780 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::reset  )  [virtual]
 

Resets all internal state as if the gsg were newly created.

Reimplemented from GraphicsStateGuardian.

Definition at line 207 of file glGraphicsStateGuardian.cxx.

References GraphicsStateGuardian::_buffer_mask.

void GraphicsStateGuardian::reset_if_new  )  [inline, inherited]
 

Calls reset() to initialize the GSG, but only if it hasn't been called yet.

Definition at line 164 of file graphicsStateGuardian.I.

References RenderState::write().

Referenced by glxGraphicsWindow::~glxGraphicsWindow(), and wglGraphicsWindow::~wglGraphicsWindow().

void GLGraphicsStateGuardian::restore_frame_buffer SavedFrameBuffer frame_buffer  )  [protected, virtual]
 

Restores the frame buffer that was previously saved.

Implements GraphicsStateGuardian.

Definition at line 4193 of file glGraphicsStateGuardian.cxx.

PointerTo< SavedFrameBuffer > GLGraphicsStateGuardian::save_frame_buffer const RenderBuffer buffer,
ConstPointerTo< DisplayRegion dr
[protected, virtual]
 

Saves the indicated planes of the frame buffer (within the indicated display region) and returns it in some meaningful form that can be restored later via restore_frame_buffer().

This is a helper function for push_frame_buffer() and pop_frame_buffer().

Implements GraphicsStateGuardian.

Definition at line 4163 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::save_mipmap_images Texture tex  )  [protected]
 

Saves out each mipmap level of the indicated texture (which must also be the currently active texture in the GL state) as a separate image file to disk.

Definition at line 4364 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::set_ambient_light const Colorf color  )  [protected, virtual]
 

Intended to be overridden by a derived class to indicate the color of the ambient light that should be in effect.

This is called by issue_light() after all other lights have been enabled or disabled.

Reimplemented from GraphicsStateGuardian.

Definition at line 3798 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::set_blend_mode ColorWriteAttrib::Mode  color_write_mode,
ColorBlendAttrib::Mode  color_blend_mode,
TransparencyAttrib::Mode  transparency_mode
[protected, virtual]
 

Called after any of these three blending states have changed; this function is responsible for setting the appropriate color blending mode based on the given properties.

Reimplemented from GraphicsStateGuardian.

Definition at line 4037 of file glGraphicsStateGuardian.cxx.

References _alpha_test_enabled, _blend_enabled, _depth_test_enabled, _fog_enabled, _polygon_offset_enabled, and _texturing_enabled.

void GraphicsStateGuardian::set_color_clear_value const Colorf value  )  [virtual, inherited]
 

Sets the color that the next do_clear() command will set the color buffer to.

Reimplemented in DXGraphicsStateGuardian7, and DXGraphicsStateGuardian8.

Definition at line 413 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_light_info, and GraphicsStateGuardian::enable_light().

void GraphicsStateGuardian::set_coordinate_system CoordinateSystem  cs  )  [inline, inherited]
 

Changes the coordinate system in effect on this particular gsg.

Normally, this will be the default coordinate system, but it might be set differently at runtime.

Definition at line 502 of file graphicsStateGuardian.I.

void GraphicsStateGuardian::set_depth_clear_value const float  value  )  [virtual, inherited]
 

Sets the depth that the next do_clear() command will set the depth buffer to.

Definition at line 428 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_clip_plane_info, GraphicsStateGuardian::_clip_planes_enabled_this_frame, GraphicsStateGuardian::enable_clip_plane(), GraphicsStateGuardian::get_unclipped_state(), GraphicsStateGuardian::modify_state(), and NULL.

void GLGraphicsStateGuardian::set_draw_buffer const RenderBuffer rb  )  [protected]
 

Sets up the glDrawBuffer to render into the buffer indicated by the RenderBuffer object.

This only sets up the color bits; it does not affect the depth, stencil, accum layers.

Definition at line 2816 of file glGraphicsStateGuardian.cxx.

References PixelBuffer::_image, compute_gl_image_size(), PixelBuffer::get_border(), get_external_image_format(), PixelBuffer::get_format(), PixelBuffer::get_image_type(), get_image_type(), get_internal_image_format(), Namable::get_name(), Texture::get_ram_image(), PixelBuffer::get_xsize(), PixelBuffer::get_ysize(), gl_force_mipmaps, gl_ignore_mipmaps, gl_supports_bgr, nassertr, NULL, pb, set_unpack_alignment(), PointerToArray< unsigned char >::size(), PixelBuffer::T_unsigned_byte, tex, uchar, uchar_bgr_to_rgb(), uchar_bgra_to_rgba(), and Texture::uses_mipmaps().

bool GraphicsStateGuardian::set_lens const Lens lens  )  [inline, inherited]
 

Sets a new lens for rendering without bothering to push or pop.

This replaces the lens most recently pushed, if any. There is no need to call prepare_lens() following this call.

The return value is true if the lens is acceptable, false if it is not.

Definition at line 482 of file graphicsStateGuardian.I.

void GLGraphicsStateGuardian::set_pack_alignment GLint  alignment  )  [inline, protected]
 

Definition at line 689 of file glGraphicsStateGuardian.I.

References _point_smooth_enabled, and INLINE.

Referenced by begin_bind_clip_planes(), and copy_texture().

void GLGraphicsStateGuardian::set_read_buffer const RenderBuffer rb  )  [protected]
 

Sets up the glReadBuffer to render into the buffer indicated by the RenderBuffer object.

This only sets up the color bits; it does not affect the depth, stencil, accum layers.

Definition at line 2871 of file glGraphicsStateGuardian.cxx.

References build_phony_mipmaps(), and tex.

void GraphicsStateGuardian::set_scene SceneSetup scene_setup  )  [inline, inherited]
 

Sets the SceneSetup object that indicates the initial camera position, etc.

This must be called before traversal begins.

Definition at line 110 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::clear(), GraphicsStateGuardian::pop_display_region(), GraphicsStateGuardian::prepare_display_region(), and GraphicsStateGuardian::push_display_region().

void GraphicsStateGuardian::set_state const RenderState state  )  [inline, inherited]
 

Applies the attributes indicated in the state set to the current state, and issues the changes to the graphics hardware.

The state is taken to be a complete description of what the graphics state should be; any transitions not mentioned are implicitly reset to their initial values.

Definition at line 220 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_current_display_region, DisplayRegionStack::_display_region, GraphicsStateGuardian::_display_region_stack_level, DisplayRegionStack::_stack_level, and INLINE.

void GraphicsStateGuardian::set_state_and_transform const RenderState state,
const TransformState transform
[virtual, inherited]
 

Simultaneously resets the render state and the transform state.

Implements GraphicsStateGuardianBase.

Definition at line 396 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_light_info.

void GraphicsStateGuardian::set_transform const TransformState transform  )  [inline, inherited]
 

Sets the world transform that will be applied to subsequent geometry.

This is normally called only during the draw process, immediately before issuing geometry commands.

Definition at line 245 of file graphicsStateGuardian.I.

References GraphicsStateGuardian::_current_display_region, DisplayRegionStack::_display_region, GraphicsStateGuardian::_display_region_stack_level, DisplayRegionStack::_stack_level, INLINE, and nassertv.

void GLGraphicsStateGuardian::set_unpack_alignment GLint  alignment  )  [inline, protected]
 

Definition at line 704 of file glGraphicsStateGuardian.I.

Referenced by set_draw_buffer().

bool GLGraphicsStateGuardian::slot_new_clip_plane int  plane_id  )  [protected, virtual]
 

This will be called by the base class before a particular clip plane id will be used for the first time.

It is intended to allow the derived class to reserve any additional resources, if required, for the new clip plane; and also to indicate whether the hardware supports this many simultaneous clipping planes.

The return value should be true if the additional plane is supported, or false if it is not.

Reimplemented from GraphicsStateGuardian.

Definition at line 3908 of file glGraphicsStateGuardian.cxx.

bool GLGraphicsStateGuardian::slot_new_light int  light_id  )  [protected, virtual]
 

This will be called by the base class before a particular light id will be used for the first time.

It is intended to allow the derived class to reserve any additional resources, if required, for the new light; and also to indicate whether the hardware supports this many simultaneous lights.

The return value should be true if the additional light is supported, or false if it is not.

Reimplemented from GraphicsStateGuardian.

Definition at line 3756 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::specify_texture Texture tex  )  [protected]
 

Definition at line 2941 of file glGraphicsStateGuardian.cxx.

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

Does some easy checks to make sure that the reference count isn't completely bogus.

Definition at line 328 of file referenceCount.I.

References INLINE.

Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount().

void GLGraphicsStateGuardian::texture_to_pixel_buffer TextureContext tc,
PixelBuffer pb,
const DisplayRegion dr
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 2049 of file glGraphicsStateGuardian.cxx.

void GLGraphicsStateGuardian::texture_to_pixel_buffer TextureContext tc,
PixelBuffer pb
[virtual]
 

Implements GraphicsStateGuardianBase.

Definition at line 2018 of file glGraphicsStateGuardian.cxx.

References PixelBuffer::_image, PointerToArray< unsigned char >::empty_array(), pb, PointerToArray< unsigned char >::size(), PixelBuffer::T_unsigned_byte, and uchar_bgr_to_rgb().

void GraphicsStateGuardian::traverse_prepared_textures bool(*  pertex_callbackfn)(TextureContext *, void *),
void *  callback_arg
[inherited]
 

Definition at line 1995 of file graphicsStateGuardian.cxx.

Referenced by DXGraphicsStateGuardian8::slot_new_clip_plane().

bool GraphicsStateGuardian::unmark_prepared_geom GeomContext gc  )  [protected, inherited]
 

This is intended to be called from within release_geom().

It removes the indicated GeomContext pointer from the _prepared_geoms set, and returns true if it was successfully removed (i.e. it had been in the set).

Definition at line 1698 of file graphicsStateGuardian.cxx.

bool GraphicsStateGuardian::unmark_prepared_geom_node GeomNodeContext gnc  )  [protected, inherited]
 

This is intended to be called from within release_geom_node().

It removes the indicated GeomNodeContext pointer from the _prepared_geom_nodes set, and returns true if it was successfully removed (i.e. it had been in the set).

Definition at line 1752 of file graphicsStateGuardian.cxx.

bool GraphicsStateGuardian::unmark_prepared_texture TextureContext tc  )  [protected, inherited]
 

This is intended to be called from within release_texture().

It removes the indicated TextureContext pointer from the _prepared_textures set, and returns true if it was successfully removed (i.e. it had been in the set).

Definition at line 1644 of file graphicsStateGuardian.cxx.

int ReferenceCount::unref  )  const [inline, inherited]
 

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 293 of file referenceCount.I.

References INLINE.

Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds().

bool GraphicsStateGuardian::wants_colors void   )  const [virtual, inherited]
 

Returns true if the GSG should issue geometry color commands, false otherwise.

Implements GraphicsStateGuardianBase.

Reimplemented in RIBGraphicsStateGuardian.

Definition at line 670 of file graphicsStateGuardian.cxx.

References GraphicsStateGuardian::_color_transform_enabled, GraphicsStateGuardian::_current_color_scale, and GraphicsStateGuardian::CT_scale.

Referenced by draw_point(), and draw_quad().

bool GLGraphicsStateGuardian::wants_normals void   )  const [virtual]
 

Reimplemented from GraphicsStateGuardian.

Definition at line 2679 of file glGraphicsStateGuardian.cxx.

References RenderBuffer::T_back_left, and RenderBuffer::T_back_right.

Referenced by draw_point(), and draw_quad().

bool GLGraphicsStateGuardian::wants_texcoords void   )  const [virtual]
 

Reimplemented from GraphicsStateGuardian.

Definition at line 2691 of file glGraphicsStateGuardian.cxx.


Member Data Documentation

Colorf GraphicsStateGuardian::_accum_clear_value [protected, inherited]
 

Definition at line 246 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::reset().

PStatCollector GraphicsStateGuardian::_active_geom_node_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light(), and GraphicsStateGuardian::slot_new_clip_plane().

PStatCollector GraphicsStateGuardian::_active_geom_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light(), and GraphicsStateGuardian::end_bind_lights().

PStatCollector GraphicsStateGuardian::_active_texusage_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::set_ambient_light().

ConstPointerTo< DisplayRegion > GLGraphicsStateGuardian::_actual_display_region [protected]
 

Definition at line 324 of file glGraphicsStateGuardian.h.

GLenum GLGraphicsStateGuardian::_alpha_func [protected]
 

Definition at line 294 of file glGraphicsStateGuardian.h.

Referenced by call_glFogEnd().

GLclampf GLGraphicsStateGuardian::_alpha_func_ref [protected]
 

Definition at line 295 of file glGraphicsStateGuardian.h.

Referenced by call_glFogEnd().

bool GLGraphicsStateGuardian::_alpha_test_enabled [protected]
 

Definition at line 312 of file glGraphicsStateGuardian.h.

Referenced by set_blend_mode().

GLenum GLGraphicsStateGuardian::_blend_dest_func [protected]
 

Definition at line 287 of file glGraphicsStateGuardian.h.

bool GLGraphicsStateGuardian::_blend_enabled [protected]
 

Definition at line 309 of file glGraphicsStateGuardian.h.

Referenced by set_blend_mode().

GLenum GLGraphicsStateGuardian::_blend_source_func [protected]
 

Definition at line 286 of file glGraphicsStateGuardian.h.

int GraphicsStateGuardian::_buffer_mask [protected, inherited]
 

Definition at line 242 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian7::DXGraphicsStateGuardian7(), reset(), CRGraphicsStateGuardian::reset(), DXGraphicsStateGuardian8::reset_panda_gsg(), CRGraphicsStateGuardian::~CRGraphicsStateGuardian(), ~GLGraphicsStateGuardian(), and GraphicsStateGuardian::~GraphicsStateGuardian().

GLclampf GLGraphicsStateGuardian::_clear_accum_alpha [protected]
 

Definition at line 269 of file glGraphicsStateGuardian.h.

Referenced by call_glClearStencil().

GLclampf GLGraphicsStateGuardian::_clear_accum_blue [protected]
 

Definition at line 269 of file glGraphicsStateGuardian.h.

Referenced by call_glClearStencil().

GLclampf GLGraphicsStateGuardian::_clear_accum_green [protected]
 

Definition at line 269 of file glGraphicsStateGuardian.h.

Referenced by call_glClearStencil().

GLclampf GLGraphicsStateGuardian::_clear_accum_red [protected]
 

Definition at line 269 of file glGraphicsStateGuardian.h.

Referenced by call_glClearStencil().

int GraphicsStateGuardian::_clear_buffer_type [protected, inherited]
 

Definition at line 247 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::reset().

GLclampf GLGraphicsStateGuardian::_clear_color_alpha [protected]
 

Definition at line 265 of file glGraphicsStateGuardian.h.

Referenced by report_errors().

GLclampf GLGraphicsStateGuardian::_clear_color_blue [protected]
 

Definition at line 265 of file glGraphicsStateGuardian.h.

Referenced by report_errors().

GLclampf GLGraphicsStateGuardian::_clear_color_green [protected]
 

Definition at line 265 of file glGraphicsStateGuardian.h.

Referenced by report_errors().

GLclampf GLGraphicsStateGuardian::_clear_color_red [protected]
 

Definition at line 265 of file glGraphicsStateGuardian.h.

Referenced by report_errors().

GLclampd GLGraphicsStateGuardian::_clear_depth [protected]
 

Definition at line 267 of file glGraphicsStateGuardian.h.

Referenced by call_glClearColor().

GLint GLGraphicsStateGuardian::_clear_stencil [protected]
 

Definition at line 268 of file glGraphicsStateGuardian.h.

Referenced by call_glClearDepth().

bool GraphicsStateGuardian::_clip_planes_enabled [protected, inherited]
 

Definition at line 266 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::issue_color(), and GraphicsStateGuardian::reset().

bool GraphicsStateGuardian::_closing_gsg [protected, inherited]
 

Definition at line 281 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::GraphicsStateGuardian(), and prepare_texture().

ColorBlendAttrib::Mode GraphicsStateGuardian::_color_blend_mode [protected, inherited]
 

Definition at line 277 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian8::enable_blend(), and GraphicsStateGuardian::reset().

Colorf GraphicsStateGuardian::_color_clear_value [protected, inherited]
 

Definition at line 243 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::reset().

int GraphicsStateGuardian::_color_transform_enabled [protected, inherited]
 

Definition at line 272 of file graphicsStateGuardian.h.

Referenced by draw_point(), DXGraphicsStateGuardian7::draw_prim_setup(), draw_quad(), CRGraphicsStateGuardian::prepare_lens(), GraphicsStateGuardian::reset(), DXGraphicsStateGuardian8::transform_color(), and GraphicsStateGuardian::wants_colors().

ColorWriteAttrib::Mode GraphicsStateGuardian::_color_write_mode [protected, inherited]
 

Definition at line 276 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian8::enable_blend(), and GraphicsStateGuardian::reset().

CoordinateSystem GraphicsStateGuardian::_coordinate_system [protected, inherited]
 

Definition at line 259 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::push_frame_buffer().

LVecBase4f GraphicsStateGuardian::_current_color_offset [protected, inherited]
 

Definition at line 273 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::reset().

LVecBase4f GraphicsStateGuardian::_current_color_scale [protected, inherited]
 

Definition at line 274 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::reset(), and GraphicsStateGuardian::wants_colors().

ConstPointerTo< DisplayRegion > GraphicsStateGuardian::_current_display_region [protected, inherited]
 

Definition at line 253 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian8::do_clear(), GraphicsStateGuardian::set_state(), and GraphicsStateGuardian::set_transform().

ConstPointerTo< Lens > GraphicsStateGuardian::_current_lens [protected, inherited]
 

Definition at line 254 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::pop_display_region(), prepare_display_region(), CRGraphicsStateGuardian::prepare_display_region(), and GraphicsStateGuardian::push_display_region().

LMatrix4f GLGraphicsStateGuardian::_current_projection_mat [protected]
 

Definition at line 321 of file glGraphicsStateGuardian.h.

int GLGraphicsStateGuardian::_decal_level [protected]
 

Definition at line 314 of file glGraphicsStateGuardian.h.

float GraphicsStateGuardian::_depth_clear_value [protected, inherited]
 

Definition at line 244 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::release_geom_node(), GraphicsStateGuardian::reset(), and DXGraphicsStateGuardian8::support_overlay_window().

GLboolean GLGraphicsStateGuardian::_depth_mask [protected]
 

Definition at line 288 of file glGraphicsStateGuardian.h.

Referenced by do_clear().

bool GLGraphicsStateGuardian::_depth_test_enabled [protected]
 

Definition at line 310 of file glGraphicsStateGuardian.h.

Referenced by enable_multisample_alpha_one(), and set_blend_mode().

int GraphicsStateGuardian::_display_region_stack_level [protected, inherited]
 

Definition at line 249 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::set_state(), GraphicsStateGuardian::set_transform(), and GraphicsStateGuardian::~GraphicsStateGuardian().

bool GLGraphicsStateGuardian::_dithering_enabled [protected]
 

Definition at line 316 of file glGraphicsStateGuardian.h.

GLenum GLGraphicsStateGuardian::_draw_buffer_mode [protected]
 

Definition at line 271 of file glGraphicsStateGuardian.h.

Referenced by call_glClearAccum().

PStatCollector GraphicsStateGuardian::_draw_primitive_pcollector [static, inherited]
 

Referenced by draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), draw_quad(), draw_sphere(), prepare_geom_node(), and CRGraphicsStateGuardian::prepare_lens().

Colorf GLGraphicsStateGuardian::_fog_color [protected]
 

Definition at line 293 of file glGraphicsStateGuardian.h.

Referenced by call_glFogStart().

GLfloat GLGraphicsStateGuardian::_fog_density [protected]
 

Definition at line 292 of file glGraphicsStateGuardian.h.

bool GLGraphicsStateGuardian::_fog_enabled [protected]
 

Definition at line 311 of file glGraphicsStateGuardian.h.

Referenced by enable_multisample_alpha_mask(), and set_blend_mode().

GLfloat GLGraphicsStateGuardian::_fog_end [protected]
 

Definition at line 291 of file glGraphicsStateGuardian.h.

Referenced by call_glFogMode().

GLint GLGraphicsStateGuardian::_fog_mode [protected]
 

Definition at line 289 of file glGraphicsStateGuardian.h.

GLfloat GLGraphicsStateGuardian::_fog_start [protected]
 

Definition at line 290 of file glGraphicsStateGuardian.h.

int GraphicsStateGuardian::_frame_buffer_stack_level [protected, inherited]
 

Definition at line 250 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::get_current_display_region(), and GraphicsStateGuardian::~GraphicsStateGuardian().

PStatCollector GraphicsStateGuardian::_frustum_cull_transforms_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

PStatCollector GraphicsStateGuardian::_frustum_cull_volumes_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

PStatCollector GraphicsStateGuardian::_geom_nodes_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

bool GraphicsStateGuardian::_has_scene_graph_color [protected, inherited]
 

Definition at line 262 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::begin_decal_base_first(), GraphicsStateGuardian::depth_offset_decals(), DXGraphicsStateGuardian8::dx_init(), and GraphicsStateGuardian::reset().

int GraphicsStateGuardian::_lens_stack_level [protected, inherited]
 

Definition at line 251 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::push_display_region(), and GraphicsStateGuardian::~GraphicsStateGuardian().

bool GraphicsStateGuardian::_lighting_enabled [protected, inherited]
 

Definition at line 265 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::begin_decal_nested(), and GraphicsStateGuardian::reset().

bool GLGraphicsStateGuardian::_line_smooth_enabled [protected]
 

Definition at line 302 of file glGraphicsStateGuardian.h.

GLfloat GLGraphicsStateGuardian::_line_width [protected]
 

Definition at line 284 of file glGraphicsStateGuardian.h.

Referenced by call_glStencilOp().

GLboolean GLGraphicsStateGuardian::_lmodel_local [protected]
 

Definition at line 282 of file glGraphicsStateGuardian.h.

Referenced by call_glScissor().

GLboolean GLGraphicsStateGuardian::_lmodel_twoside [protected]
 

Definition at line 283 of file glGraphicsStateGuardian.h.

Referenced by call_glViewport().

int GLGraphicsStateGuardian::_max_clip_planes [protected]
 

Definition at line 319 of file glGraphicsStateGuardian.h.

Referenced by get_internal_image_format().

int GLGraphicsStateGuardian::_max_lights [protected]
 

Definition at line 318 of file glGraphicsStateGuardian.h.

bool GLGraphicsStateGuardian::_multisample_alpha_mask_enabled [protected]
 

Definition at line 308 of file glGraphicsStateGuardian.h.

bool GLGraphicsStateGuardian::_multisample_alpha_one_enabled [protected]
 

Definition at line 307 of file glGraphicsStateGuardian.h.

bool GLGraphicsStateGuardian::_multisample_enabled [protected]
 

Definition at line 301 of file glGraphicsStateGuardian.h.

bool GraphicsStateGuardian::_needs_reset [protected, inherited]
 

Definition at line 280 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::GraphicsStateGuardian(), and GraphicsStateGuardian::~GraphicsStateGuardian().

PStatCollector GraphicsStateGuardian::_nodes_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

bool GraphicsStateGuardian::_normals_enabled [protected, inherited]
 

Definition at line 257 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian8::dx_init(), and GraphicsStateGuardian::reset().

GLint GLGraphicsStateGuardian::_pack_alignment [protected]
 

Definition at line 298 of file glGraphicsStateGuardian.h.

int GLGraphicsStateGuardian::_pass_number [protected]
 

Definition at line 326 of file glGraphicsStateGuardian.h.

GLfloat GLGraphicsStateGuardian::_point_size [protected]
 

Definition at line 285 of file glGraphicsStateGuardian.h.

bool GLGraphicsStateGuardian::_point_smooth_enabled [protected]
 

Definition at line 303 of file glGraphicsStateGuardian.h.

Referenced by set_pack_alignment().

GLenum GLGraphicsStateGuardian::_polygon_mode [protected]
 

Definition at line 296 of file glGraphicsStateGuardian.h.

Referenced by call_glFogColor().

bool GLGraphicsStateGuardian::_polygon_offset_enabled [protected]
 

Definition at line 313 of file glGraphicsStateGuardian.h.

Referenced by set_blend_mode().

int GLGraphicsStateGuardian::_projection_mat_stack_count [protected]
 

Definition at line 322 of file glGraphicsStateGuardian.h.

GLenum GLGraphicsStateGuardian::_read_buffer_mode [protected]
 

Definition at line 272 of file glGraphicsStateGuardian.h.

PStatCollector GraphicsStateGuardian::_render_states_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

PStatCollector GraphicsStateGuardian::_render_states_unused_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

Colorf GraphicsStateGuardian::_scene_graph_color [protected, inherited]
 

Definition at line 261 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::depth_offset_decals(), DXGraphicsStateGuardian7::draw_prim_setup(), CRGraphicsStateGuardian::enable_polygon_offset(), and DXGraphicsStateGuardian8::transform_color().

bool GraphicsStateGuardian::_scene_graph_color_stale [protected, inherited]
 

Definition at line 263 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::begin_decal_base_first(), GraphicsStateGuardian::depth_offset_decals(), DXGraphicsStateGuardian7::draw_prim_setup(), CRGraphicsStateGuardian::enable_polygon_offset(), GraphicsStateGuardian::reset(), and DXGraphicsStateGuardian8::transform_color().

PointerTo< SceneSetup > GraphicsStateGuardian::_scene_setup [protected, inherited]
 

Definition at line 237 of file graphicsStateGuardian.h.

Referenced by CRGraphicsStateGuardian::get_internal_image_format(), GraphicsStateGuardian::get_pipe(), GraphicsStateGuardian::get_threading_model(), issue_alpha_test(), CRGraphicsStateGuardian::issue_color_write(), issue_cull_face(), DXGraphicsStateGuardian8::issue_depth_test(), DXGraphicsStateGuardian8::issue_depth_write(), CRGraphicsStateGuardian::issue_depth_write(), CRGraphicsStateGuardian::issue_fog(), and DXGraphicsStateGuardian8::issue_render_mode().

bool GLGraphicsStateGuardian::_scissor_enabled [protected]
 

Definition at line 304 of file glGraphicsStateGuardian.h.

Referenced by enable_point_smooth().

GLsizei GLGraphicsStateGuardian::_scissor_height [protected]
 

Definition at line 277 of file glGraphicsStateGuardian.h.

Referenced by call_glReadBuffer().

GLsizei GLGraphicsStateGuardian::_scissor_width [protected]
 

Definition at line 276 of file glGraphicsStateGuardian.h.

Referenced by call_glReadBuffer().

GLint GLGraphicsStateGuardian::_scissor_x [protected]
 

Definition at line 274 of file glGraphicsStateGuardian.h.

Referenced by call_glReadBuffer().

GLint GLGraphicsStateGuardian::_scissor_y [protected]
 

Definition at line 275 of file glGraphicsStateGuardian.h.

Referenced by call_glReadBuffer().

PStatCollector GraphicsStateGuardian::_set_state_pcollector [static, inherited]
 

GLenum GLGraphicsStateGuardian::_shade_model_mode [protected]
 

Definition at line 273 of file glGraphicsStateGuardian.h.

ConstPointerTo< RenderState > GraphicsStateGuardian::_state [protected, inherited]
 

Definition at line 239 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::clear(), draw_sprite(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian7::draw_sprite(), RIBGraphicsStateGuardian::reset_file(), and GraphicsStateGuardian::~GraphicsStateGuardian().

PStatCollector GraphicsStateGuardian::_state_changes_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

bool GraphicsStateGuardian::_stencil_clear_value [protected, inherited]
 

Definition at line 245 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::reset(), and DXGraphicsStateGuardian8::support_overlay_window().

bool GLGraphicsStateGuardian::_stencil_test_enabled [protected]
 

Definition at line 306 of file glGraphicsStateGuardian.h.

PStatCollector GraphicsStateGuardian::_texmgrmem_resident_pcollector [static, inherited]
 

PStatCollector GraphicsStateGuardian::_texmgrmem_total_pcollector [static, inherited]
 

PStatCollector GraphicsStateGuardian::_texture_state_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

bool GLGraphicsStateGuardian::_texturing_enabled [protected]
 

Definition at line 305 of file glGraphicsStateGuardian.h.

Referenced by issue_depth_offset(), and set_blend_mode().

PStatCollector GraphicsStateGuardian::_total_geom_node_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::bind_light(), and GraphicsStateGuardian::slot_new_light().

PStatCollector GraphicsStateGuardian::_total_geom_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::bind_light().

PStatCollector GraphicsStateGuardian::_total_texmem_pcollector [static, inherited]
 

PStatCollector GraphicsStateGuardian::_total_texusage_pcollector [static, inherited]
 

ConstPointerTo< TransformState > GraphicsStateGuardian::_transform [protected, inherited]
 

Definition at line 240 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::~GraphicsStateGuardian().

PStatCollector GraphicsStateGuardian::_transform_state_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_clip_planes(), and GraphicsStateGuardian::enable_light().

PStatCollector GraphicsStateGuardian::_transform_states_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

PStatCollector GraphicsStateGuardian::_transform_states_unused_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light().

TransparencyAttrib::Mode GraphicsStateGuardian::_transparency_mode [protected, inherited]
 

Definition at line 278 of file graphicsStateGuardian.h.

Referenced by DXGraphicsStateGuardian8::enable_blend(), and GraphicsStateGuardian::reset().

TypeHandle GLGraphicsStateGuardian::_type_handle [static, private]
 

Reimplemented from GraphicsStateGuardian.

Reimplemented in glxGraphicsStateGuardian, and wglGraphicsStateGuardian.

Definition at line 82 of file glGraphicsStateGuardian.cxx.

GLint GLGraphicsStateGuardian::_unpack_alignment [protected]
 

Definition at line 299 of file glGraphicsStateGuardian.h.

PStatCollector GraphicsStateGuardian::_used_texmem_pcollector [static, inherited]
 

bool GraphicsStateGuardian::_vertex_colors_enabled [protected, inherited]
 

Definition at line 264 of file graphicsStateGuardian.h.

Referenced by GraphicsStateGuardian::begin_decal_base_first(), GraphicsStateGuardian::depth_offset_decals(), and GraphicsStateGuardian::reset().

PStatCollector GLGraphicsStateGuardian::_vertices_display_list_pcollector [static]
 

Definition at line 337 of file glGraphicsStateGuardian.h.

Referenced by prepare_geom_node().

PStatCollector GraphicsStateGuardian::_vertices_other_pcollector [static, inherited]
 

Referenced by draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), GraphicsStateGuardian::enable_light(), CRGraphicsStateGuardian::prepare_lens(), and CRGraphicsStateGuardian::release_texture().

PStatCollector GraphicsStateGuardian::_vertices_pcollector [static, inherited]
 

PStatCollector GraphicsStateGuardian::_vertices_tri_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light(), and CRGraphicsStateGuardian::release_texture().

PStatCollector GraphicsStateGuardian::_vertices_trifan_pcollector [static, inherited]
 

Referenced by GraphicsStateGuardian::enable_light(), and CRGraphicsStateGuardian::release_texture().

PStatCollector GraphicsStateGuardian::_vertices_tristrip_pcollector [static, inherited]
 

Referenced by draw_quad(), GraphicsStateGuardian::enable_light(), and CRGraphicsStateGuardian::release_texture().

GLsizei GLGraphicsStateGuardian::_viewport_height [protected]
 

Definition at line 281 of file glGraphicsStateGuardian.h.

Referenced by call_glShadeModel().

GLsizei GLGraphicsStateGuardian::_viewport_width [protected]
 

Definition at line 280 of file glGraphicsStateGuardian.h.

Referenced by call_glShadeModel().

GLint GLGraphicsStateGuardian::_viewport_x [protected]
 

Definition at line 278 of file glGraphicsStateGuardian.h.

Referenced by call_glShadeModel().

GLint GLGraphicsStateGuardian::_viewport_y [protected]
 

Definition at line 279 of file glGraphicsStateGuardian.h.

Referenced by call_glShadeModel().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:51:11 2003 for Panda by doxygen1.3