Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes
GraphicsStateGuardianBase Class Reference

This is a base class for the GraphicsStateGuardian class, which is itself a base class for the various GSG's for different platforms. More...

#include "graphicsStateGuardianBase.h"

Inheritance diagram for GraphicsStateGuardianBase:
TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase GraphicsStateGuardian DXGraphicsStateGuardian8 DXGraphicsStateGuardian9 TinyGraphicsStateGuardian

List of all members.

Public Member Functions

virtual bool begin_draw_primitives (const GeomPipelineReader *geom_reader, const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force)=0
virtual void begin_occlusion_query ()=0
virtual void bind_light (PointLight *light_obj, const NodePath &light, int light_id)
virtual void bind_light (DirectionalLight *light_obj, const NodePath &light, int light_id)
virtual void bind_light (Spotlight *light_obj, const NodePath &light, int light_id)
virtual void clear_before_callback ()=0
virtual void clear_state_and_transform ()=0
virtual PN_stdfloat compute_distance_to (const LPoint3 &point) const =0
virtual CPT (RenderState) begin_decal_base_first()=0
virtual CPT (RenderState) begin_decal_nested()=0
virtual CPT (RenderState) begin_decal_base_second()=0
virtual bool depth_offset_decals ()=0
virtual bool draw_lines (const GeomPrimitivePipelineReader *reader, bool force)=0
virtual bool draw_linestrips (const GeomPrimitivePipelineReader *reader, bool force)=0
virtual bool draw_points (const GeomPrimitivePipelineReader *reader, bool force)=0
virtual bool draw_triangles (const GeomPrimitivePipelineReader *reader, bool force)=0
virtual bool draw_trifans (const GeomPrimitivePipelineReader *reader, bool force)=0
virtual bool draw_tristrips (const GeomPrimitivePipelineReader *reader, bool force)=0
virtual void end_draw_primitives ()=0
virtual bool extract_texture_data (Texture *tex)=0
virtual void finish_decal ()=0
virtual TypeHandle force_init_type ()
virtual bool framebuffer_copy_to_ram (Texture *tex, int z, const DisplayRegion *dr, const RenderBuffer &rb)=0
virtual bool framebuffer_copy_to_texture (Texture *tex, int z, const DisplayRegion *dr, const RenderBuffer &rb)=0
virtual const TransformStateget_cs_transform () const =0
virtual bool get_effective_incomplete_render () const =0
virtual bool get_incomplete_render () const =0
virtual CoordinateSystem get_internal_coordinate_system () const =0
virtual int get_max_texture_dimension () const =0
virtual int get_max_vertices_per_array () const =0
virtual int get_max_vertices_per_primitive () const =0
virtual PreparedGraphicsObjectsget_prepared_objects ()=0
virtual SceneSetupget_scene () const =0
virtual int get_supported_geom_rendering () const =0
virtual bool get_supports_compressed_texture_format (int compression_mode) const =0
virtual bool get_supports_multisample () const =0
virtual bool get_supports_occlusion_query () const =0
virtual bool get_supports_shadow_filter () const =0
virtual TypeHandle get_type () const
 MAKE_SEQ (get_gsgs, get_num_gsgs, get_gsg)
virtual bool prefers_triangle_strips () const =0
virtual GeomContextprepare_geom (Geom *geom)=0
virtual IndexBufferContextprepare_index_buffer (GeomPrimitive *data)=0
virtual ShaderContextprepare_shader (Shader *shader)=0
virtual TextureContextprepare_texture (Texture *tex, int view)=0
virtual VertexBufferContextprepare_vertex_buffer (GeomVertexArrayData *data)=0
virtual PT (OcclusionQueryContext) end_occlusion_query()=0
virtual PT (GeomMunger) get_geom_munger(const RenderState *state
virtual PT (Texture) make_shadow_buffer(const NodePath &light_np
virtual void release_geom (GeomContext *gc)=0
virtual void release_index_buffer (IndexBufferContext *ibc)=0
virtual void release_shader (ShaderContext *sc)=0
virtual void release_texture (TextureContext *tc)=0
virtual void release_vertex_buffer (VertexBufferContext *vbc)=0
virtual void remove_window (GraphicsOutputBase *window)=0
virtual void set_state_and_transform (const RenderState *state, const TransformState *transform)=0
virtual bool update_texture (TextureContext *tc, bool force)=0

Static Public Member Functions

static void add_gsg (GraphicsStateGuardianBase *gsg)
 Called by a GSG after it has been initialized, to add a new GSG to the available list.
static TypeHandle get_class_type ()
static GraphicsStateGuardianBaseget_default_gsg ()
 Returns a pointer to the "default" GSG.
static GraphicsStateGuardianBaseget_gsg (int n)
 Returns the nth GSG in the universe.
static int get_num_gsgs ()
 Returns the total number of GSG's in the universe.
static void init_type ()
static void remove_gsg (GraphicsStateGuardianBase *gsg)
 Called by a GSG destructor to remove a GSG from the available list.
static void set_default_gsg (GraphicsStateGuardianBase *default_gsg)
 Specifies a particular GSG to use as the "default" GSG.

Public Attributes

virtual Threadcurrent_thread = 0
virtual GraphicsOutputBasehost = 0

Detailed Description

This is a base class for the GraphicsStateGuardian class, which is itself a base class for the various GSG's for different platforms.

This class contains all the function prototypes to support the double-dispatch of GSG to geoms, transitions, etc. It lives in a separate class in its own package so we can avoid circular build dependency problems.

GraphicsStateGuardians are not actually writable to bam files, of course, but they may be passed as event parameters, so they inherit from TypedWritableReferenceCount instead of TypedReferenceCount for that convenience.

Definition at line 111 of file graphicsStateGuardianBase.h.


Member Function Documentation

Called by a GSG after it has been initialized, to add a new GSG to the available list.

Definition at line 90 of file graphicsStateGuardianBase.cxx.

Referenced by TinyGraphicsStateGuardian::reset(), DXGraphicsStateGuardian8::reset(), and DXGraphicsStateGuardian9::reset().

Returns a pointer to the "default" GSG.

This is typically the first GSG created in an application; in a single-window application, it will be the only GSG. This GSG is used to determine default optimization choices for loaded geometry.

The return value may be NULL if a GSG has not been created.

Definition at line 37 of file graphicsStateGuardianBase.cxx.

Referenced by Texture::adjust_size(), Texture::do_consider_auto_process_ram_image(), and SceneGraphReducer::set_gsg().

Returns the nth GSG in the universe.

GSG's automatically add themselves and remove themselves from this list as they are created and destroyed.

Definition at line 78 of file graphicsStateGuardianBase.cxx.

Referenced by PipeOcclusionCullTraverser::end_traverse(), GraphicsEngine::remove_window(), and PipeOcclusionCullTraverser::set_scene().

Returns the total number of GSG's in the universe.

Definition at line 66 of file graphicsStateGuardianBase.cxx.

Called by a GSG destructor to remove a GSG from the available list.

Definition at line 112 of file graphicsStateGuardianBase.cxx.

Specifies a particular GSG to use as the "default" GSG.

See get_default_gsg().

Definition at line 49 of file graphicsStateGuardianBase.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations