GraphicsStateGuardianBase

class GraphicsStateGuardianBase

Bases: TypedWritableReferenceCount

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.

Inheritance diagram

Inheritance diagram of GraphicsStateGuardianBase

static TypeHandle get_class_type(void)
static GraphicsStateGuardianBase *get_default_gsg(void)

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.

virtual bool get_effective_incomplete_render(void) const = 0
static GraphicsStateGuardianBase *get_gsg(std::size_t n)

Returns the nth GSG in the universe. GSG’s automatically add themselves and remove themselves from this list as they are created and destroyed.

virtual bool get_incomplete_render(void) const = 0
virtual int get_max_texture_dimension(void) const = 0
virtual int get_max_vertices_per_array(void) const = 0
virtual int get_max_vertices_per_primitive(void) const = 0
static std::size_t get_num_gsgs(void)

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

virtual int get_supported_geom_rendering(void) const = 0
virtual bool get_supports_compressed_texture_format(int compression_mode) const = 0
virtual bool get_supports_hlsl(void) const = 0
virtual bool get_supports_multisample(void) const = 0
virtual bool get_supports_shadow_filter(void) const = 0
virtual bool get_supports_texture_srgb(void) const = 0
virtual bool prefers_triangle_strips(void) const = 0
static void set_default_gsg(GraphicsStateGuardianBase *default_gsg)

Specifies a particular GSG to use as the “default” GSG. See get_default_gsg().