Panda3D
|
Encapsulates all the communication with a particular instance of a given rendering backend. More...
#include <pandadoc.hpp>
Public Types | |
enum | ShaderModel { SM_00 = 0 , SM_11 = 1 , SM_20 = 2 , SM_2X = 3 , SM_30 = 4 , SM_40 = 5 , SM_50 = 6 , SM_51 = 7 } |
Public Member Functions | |
bool | beginScene () |
clearFlashTexture () | |
endScene () | |
bool | getAlphaScaleViaTexture () |
Returns true if this particular GSG can implement (or would prefer to implement) an alpha scale via an additional Texture layer, or false if we need to actually munge the alpha. | |
bool | getAlphaScaleViaTexture (const TextureAttrib tex_attrib) |
This variant of get_alpha_scale_via_texture() answers the question of whether the GSG can implement an alpha scale via an additional Texture layer, considering the current TextureAttrib that will be in effect. | |
bool | getColorScaleViaLighting () |
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or color scale using materials and/or ambient lights, or false if we need to actually munge the color. | |
CoordinateSystem | getCoordinateSystem () |
Returns the coordinate system in effect on this particular gsg. | |
bool | getCopyTextureInverted () |
Returns true if this particular GSG has the property that any framebuffer- to-texture copy results in a texture that is upside-down and backwards from Panda's usual convention; that is, it copies into a texture from the bottom up instead of from the top down. | |
str | getDriverRenderer () |
int | getDriverShaderVersionMajor () |
int | getDriverShaderVersionMinor () |
str | getDriverVendor () |
str | getDriverVersion () |
int | getDriverVersionMajor () |
int | getDriverVersionMinor () |
GraphicsEngine | getEngine () |
Texture | getFlashTexture () |
float | getGamma () |
CoordinateSystem | getInternalCoordinateSystem () |
Loader | getLoader () |
Returns the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true. | |
int | getMax2dTextureArrayLayers () |
Returns the largest possible number of pages, or -1 if there is no particular limit. | |
int | getMax3dTextureDimension () |
Returns the largest possible texture size in any one dimension for a 3-d texture, or -1 if there is no particular limit. | |
int | getMaxBufferTextureSize () |
Returns the largest possible buffer texture size, or -1 if there is no particular limit. | |
int | getMaxClipPlanes () |
Returns the maximum number of simultaneous clip planes that may be applied to geometry, or -1 if there is no particular limit. | |
int | getMaxColorTargets () |
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture, as supported by this particular GSG. | |
int | getMaxCubeMapDimension () |
Returns the largest possible texture size in any one dimension for a cube map texture, or -1 if there is no particular limit. | |
int | getMaximumSimultaneousRenderTargets () |
Deprecated. | |
int | getMaxLights () |
Returns the maximum number of simultaneous lights that may be rendered on geometry, or -1 if there is no particular limit. | |
int | getMaxTextureStages () |
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturing, as supported by this particular GSG. | |
int | getMaxVertexTransformIndices () |
Returns the maximum number of transforms there may be in a single TransformTable for this graphics hardware. | |
int | getMaxVertexTransforms () |
Returns the maximum number of transform matrices that may be simultaneously used to transform any one vertex by the graphics hardware. | |
GraphicsPipe | getPipe () |
Returns the graphics pipe on which this GSG was created. | |
PreparedGraphicsObjects | getPreparedObjects () |
object | getPreparedTextures () |
bool | getRuntimeColorScale () |
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or color scale directly, without requiring any munging of vertices or tricks with lighting. | |
SceneSetup | getScene () |
ShaderGenerator | getShaderGenerator () |
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary. | |
GraphicsStateGuardian::ShaderModel | getShaderModel () |
Returns the ShaderModel. | |
bool | getSupports2dTextureArray () |
Returns true if this GSG can render 2-d textures array. | |
bool | getSupports3dTexture () |
Returns true if this GSG can render 3-d (volumetric) textures. | |
bool | getSupportsBasicShaders () |
Returns true if this particular GSG supports arbfp1+arbvp1 or above. | |
bool | getSupportsBufferTexture () |
Returns true if this GSG can render buffer textures. | |
bool | getSupportsCgProfile (str name) |
bool | getSupportsCompressedTexture () |
Returns true if this GSG can compress textures as it loads them into texture memory, and/or accept pre-compressed textures for storing. | |
bool | getSupportsComputeShaders () |
Returns true if this particular GSG supports compute shaders. | |
bool | getSupportsCubeMap () |
Returns true if this GSG can render cube map textures. | |
bool | getSupportsCubeMapArray () |
Returns true if this GSG can render cube map arrays. | |
bool | getSupportsDepthStencil () |
Returns true if this particular GSG supports textures whose format is F_depth_stencil. | |
bool | getSupportsDepthTexture () |
Returns true if this particular GSG supports textures whose format is F_depth_stencil. | |
bool | getSupportsDualSourceBlending () |
Returns true if dual source (incoming1_color and incoming1_alpha) blend operands are supported by this GSG. | |
bool | getSupportsGenerateMipmap () |
Returns true if this particular GSG can generate mipmaps for a texture automatically, or if they must be generated in software. | |
bool | getSupportsGeometryInstancing () |
Returns true if this particular GSG supports hardware geometry instancing: the ability to render multiple copies of a model. | |
bool | getSupportsGeometryShaders () |
Returns true if this particular GSG supports geometry shaders. | |
bool | getSupportsGlsl () |
Returns true if this particular GSG supports GLSL shaders. | |
bool | getSupportsIndirectDraw () |
Returns true if this particular GSG supports draw calls for which the information comes from a buffer. | |
bool | getSupportsLuminanceTexture () |
Returns true if this particular GSG supports luminance textures. | |
bool | getSupportsOcclusionQuery () |
Returns true if this GSG supports an occlusion query. | |
bool | getSupportsSamplerObjects () |
Returns true if this particular GSG supports the use of sampler objects to record texture sampling parameters separately from the texture objects. | |
bool | getSupportsStencil () |
Returns true if this particular GSG supports stencil buffers at all. | |
bool | getSupportsTessellationShaders () |
Returns true if this particular GSG supports tesselation shaders. | |
bool | getSupportsTexNonPow2 () |
Returns true if this GSG can handle non power of two sized textures. | |
bool | getSupportsTextureCombine () |
Returns true if this particular GSG can use the TextureStage::M_combine mode, which includes all of the texture blend modes specified by set_combine_rgb() and/or set_combine_alpha(). | |
bool | getSupportsTextureDot3 () |
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes. | |
bool | getSupportsTextureSavedResult () |
Returns true if this GSG can use the TextureStage::CS_last_saved_result source, which allows you to save the result of a TextureStage and re-use it for multiple inputs. | |
bool | getSupportsTimerQuery () |
Returns true if this GSG supports a timer query. | |
bool | getSupportsTwoSidedStencil () |
Returns true if this particular GSG supports two sided stencil: different stencil settings for the front and back side of the same polygon. | |
Texture::QualityLevel | getTextureQualityOverride () |
Returns the global quality_level override specified by set_texture_quality_override. | |
const GraphicsThreadingModel | getThreadingModel () |
Returns the threading model that was used to create this GSG. | |
bool | getTimerQueriesActive () |
Returns true if timer queries are currently enabled on this GSG. | |
bool | hasExtension (str extension) |
bool | isActive () |
Returns the active flag associated with the GraphicsStateGuardian. | |
bool | isHardware () |
Returns true if this GSG appears to be hardware-accelerated, or false if it is known to be software only. | |
bool | isValid () |
Returns true if the GSG has been correctly initialized within a graphics context, false if there has been some problem or it hasn't been initialized yet. | |
bool | needsReset () |
Returns true if the gsg is marked as needing a reset. | |
releaseAll () | |
Releases all prepared objects. | |
int | releaseAllGeoms () |
Frees the resources for all geoms associated with this GSG. | |
int | releaseAllIndexBuffers () |
Frees the resources for all index buffers associated with this GSG. | |
int | releaseAllSamplers () |
Frees the resources for all samplers associated with this GSG. | |
int | releaseAllShaderBuffers () |
Frees the resources for all index buffers associated with this GSG. | |
int | releaseAllTextures () |
Frees the resources for all textures associated with this GSG. | |
int | releaseAllVertexBuffers () |
Frees the resources for all vertex buffers associated with this GSG. | |
restoreGamma () | |
setActive (bool active) | |
Sets the active flag associated with the GraphicsStateGuardian. | |
setCoordinateSystem (CoordinateSystem cs) | |
setFlashTexture (Texture tex) | |
bool | setGamma (float gamma) |
setIncompleteRender (bool incomplete_render) | |
Sets the incomplete_render flag. | |
setLoader (Loader loader) | |
Sets the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true. | |
bool | setScene (SceneSetup scene_setup) |
setShaderGenerator (ShaderGenerator shader_generator) | |
Sets the ShaderGenerator object that will be used by this GSG to generate shaders when necessary. | |
setShaderModel (GraphicsStateGuardian::ShaderModel shader_model) | |
Sets the ShaderModel. | |
setTextureQualityOverride (Texture::QualityLevel quality_level) | |
Specifies the global quality_level to be imposed for all Textures rendered by this GSG. | |
![]() | |
bool | getEffectiveIncompleteRender () |
list | getGsgs () |
bool | getIncompleteRender () |
int | getMaxTextureDimension () |
int | getMaxVerticesPerArray () |
int | getMaxVerticesPerPrimitive () |
int | getSupportedGeomRendering () |
bool | getSupportsCompressedTextureFormat (int compression_mode) |
bool | getSupportsHlsl () |
bool | getSupportsMultisample () |
bool | getSupportsShadowFilter () |
bool | getSupportsTextureSrgb () |
bool | prefersTriangleStrips () |
![]() | |
object | __reduce__ () |
object | __reduce_persist__ (object pickler) |
VectorUchar | encodeToBamStream () |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a bytes object. | |
bool | encodeToBamStream (VectorUchar data, BamWriter writer) |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. | |
fillin (DatagramIterator scan, BamReader manager) | |
This internal function is intended to be called by each class's make_from_bam() method to read in all of the relevant data from the BamFile for the new object. | |
UpdateSeq | getBamModified () |
Returns the current bam_modified counter. | |
markBamModified () | |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. | |
![]() | |
int | getRefCount () |
Returns the current reference count. | |
ref () | |
Explicitly increments the reference count. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
Static Public Member Functions | |
static TextureStage | getAlphaScaleTextureStage () |
Returns the TextureStage that will be used to apply an alpha scale, if get_alpha_scale_via_texture() returns true. | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
static GraphicsStateGuardianBase | getDefaultGsg () |
Returns a pointer to the "default" GSG. | |
static GraphicsStateGuardianBase | getGsg (int n) |
Returns the nth GSG in the universe. | |
static int | getNumGsgs () |
Returns the total number of GSG's in the universe. | |
static | setDefaultGsg (GraphicsStateGuardianBase default_gsg) |
Specifies a particular GSG to use as the "default" GSG. | |
![]() | |
static TypedWritableReferenceCount | decodeFromBamStream (VectorUchar data, BamReader reader) |
Reads the bytes created by a previous call to encode_to_bam_stream(), and extracts and returns the single object on those bytes. | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
Public Attributes | |
bool | active |
Returns the active flag associated with the GraphicsStateGuardian. | |
CoordinateSystem | coordinate_system |
Returns the coordinate system in effect on this particular gsg. | |
bool | copy_texture_inverted |
Returns true if this particular GSG has the property that any framebuffer- to-texture copy results in a texture that is upside-down and backwards from Panda's usual convention; that is, it copies into a texture from the bottom up instead of from the top down. | |
String | driver_renderer |
int | driver_shader_version_major |
int | driver_shader_version_minor |
String | driver_vendor |
String | driver_version |
int | driver_version_major |
int | driver_version_minor |
bool | effective_incomplete_render |
Returns true if the GSG is effectively in incomplete_render state, considering both the GSG's incomplete_render and its current DisplayRegion's incomplete_render flags. | |
Texture | flash_texture |
float | gamma |
bool | incomplete_render |
Returns the incomplete_render flag. | |
Loader | loader |
Returns the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true. | |
int | max_2d_texture_array_layers |
z axis | |
int | max_3d_texture_dimension |
Returns the largest possible texture size in any one dimension for a 3-d texture, or -1 if there is no particular limit. | |
int | max_buffer_texture_size |
Returns the largest possible buffer texture size, or -1 if there is no particular limit. | |
int | max_clip_planes |
Returns the maximum number of simultaneous clip planes that may be applied to geometry, or -1 if there is no particular limit. | |
int | max_color_targets |
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture, as supported by this particular GSG. | |
int | max_cube_map_dimension |
z axis | |
int | max_lights |
Returns the maximum number of simultaneous lights that may be rendered on geometry, or -1 if there is no particular limit. | |
int | max_texture_dimension |
Returns the largest possible texture size in any one dimension supported by the GSG, or -1 if there is no particular limit. | |
int | max_texture_stages |
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturing, as supported by this particular GSG. | |
int | max_vertex_transform_indices |
Returns the maximum number of transforms there may be in a single TransformTable for this graphics hardware. | |
int | max_vertex_transforms |
Returns the maximum number of transform matrices that may be simultaneously used to transform any one vertex by the graphics hardware. | |
int | max_vertices_per_array |
Returns the maximum number of vertices that should be put into any one GeomVertexData object for use with this GSG. | |
int | max_vertices_per_primitive |
Returns the maximum number of vertex indices that should be put into any one GeomPrimitive object for use with this GSG. | |
GraphicsPipe | pipe |
Returns the graphics pipe on which this GSG was created. | |
PreparedGraphicsObjects | prepared_objects |
SceneSetup | scene |
ShaderGenerator | shader_generator |
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary. | |
GraphicsStateGuardian::ShaderModel | shader_model |
Returns the ShaderModel. | |
bool | supports_2d_texture_array |
Returns true if this GSG can render 2-d textures array. | |
bool | supports_3d_texture |
Returns true if this GSG can render 3-d (volumetric) textures. | |
bool | supports_basic_shaders |
Returns true if this particular GSG supports arbfp1+arbvp1 or above. | |
bool | supports_buffer_texture |
Returns true if this GSG can render buffer textures. | |
bool | supports_compressed_texture |
Returns true if this GSG can compress textures as it loads them into texture memory, and/or accept pre-compressed textures for storing. | |
bool | supports_compute_shaders |
Returns true if this particular GSG supports compute shaders. | |
bool | supports_cube_map |
Returns true if this GSG can render cube map textures. | |
bool | supports_cube_map_array |
Returns true if this GSG can render cube map arrays. | |
bool | supports_depth_stencil |
Returns true if this particular GSG supports textures whose format is F_depth_stencil. | |
bool | supports_depth_texture |
Returns true if this particular GSG supports textures whose format is F_depth_stencil. | |
bool | supports_dual_source_blending |
Returns true if dual source (incoming1_color and incoming1_alpha) blend operands are supported by this GSG. | |
bool | supports_generate_mipmap |
Returns true if this particular GSG can generate mipmaps for a texture automatically, or if they must be generated in software. | |
bool | supports_geometry_instancing |
Returns true if this particular GSG supports hardware geometry instancing: the ability to render multiple copies of a model. | |
bool | supports_geometry_shaders |
Returns true if this particular GSG supports geometry shaders. | |
bool | supports_glsl |
Returns true if this particular GSG supports GLSL shaders. | |
bool | supports_hlsl |
Returns true if this particular GSG supports HLSL shaders. | |
bool | supports_indirect_draw |
Returns true if this particular GSG supports draw calls for which the information comes from a buffer. | |
bool | supports_luminance_texture |
Returns true if this particular GSG supports luminance textures. | |
bool | supports_multisample |
bool | supports_occlusion_query |
Returns true if this GSG supports an occlusion query. | |
bool | supports_sampler_objects |
Returns true if this particular GSG supports the use of sampler objects to record texture sampling parameters separately from the texture objects. | |
bool | supports_shadow_filter |
Returns true if this particular GSG supports the filter mode FT_shadow for depth textures. | |
bool | supports_stencil |
Returns true if this particular GSG supports stencil buffers at all. | |
bool | supports_tessellation_shaders |
Returns true if this particular GSG supports tesselation shaders. | |
bool | supports_tex_non_pow2 |
Returns true if this GSG can handle non power of two sized textures. | |
bool | supports_texture_combine |
Returns true if this particular GSG can use the TextureStage::M_combine mode, which includes all of the texture blend modes specified by set_combine_rgb() and/or set_combine_alpha(). | |
bool | supports_texture_dot3 |
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes. | |
bool | supports_texture_saved_result |
Returns true if this GSG can use the TextureStage::CS_last_saved_result source, which allows you to save the result of a TextureStage and re-use it for multiple inputs. | |
bool | supports_texture_srgb |
Returns true if this GSG can handle sRGB textures. | |
bool | supports_timer_query |
Returns true if this GSG supports a timer query. | |
bool | supports_two_sided_stencil |
Returns true if this particular GSG supports two sided stencil: different stencil settings for the front and back side of the same polygon. | |
Texture::QualityLevel | texture_quality_override |
Returns the global quality_level override specified by set_texture_quality_override. | |
bool | timer_queries_active |
Returns true if timer queries are currently enabled on this GSG. | |
bool | valid |
Returns true if the GSG has been correctly initialized within a graphics context, false if there has been some problem or it hasn't been initialized yet. | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. | |
![]() | |
int | ref_count |
The current reference count. | |
Encapsulates all the communication with a particular instance of a given rendering backend.
Tries to guarantee that redundant state-change requests are not issued (hence "state guardian").
There will be one of these objects for each different graphics context active in the system.
enum ShaderModel |
bool beginScene | ( | ) |
clearFlashTexture | ( | ) |
endScene | ( | ) |
|
static |
Returns the TextureStage that will be used to apply an alpha scale, if get_alpha_scale_via_texture() returns true.
bool getAlphaScaleViaTexture | ( | ) |
Returns true if this particular GSG can implement (or would prefer to implement) an alpha scale via an additional Texture layer, or false if we need to actually munge the alpha.
bool getAlphaScaleViaTexture | ( | const TextureAttrib | tex_attrib | ) |
This variant of get_alpha_scale_via_texture() answers the question of whether the GSG can implement an alpha scale via an additional Texture layer, considering the current TextureAttrib that will be in effect.
This considers whether there is at least one additional texture slot available on the GSG.
|
static |
bool getColorScaleViaLighting | ( | ) |
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or color scale using materials and/or ambient lights, or false if we need to actually munge the color.
CoordinateSystem getCoordinateSystem | ( | ) |
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.
bool getCopyTextureInverted | ( | ) |
Returns true if this particular GSG has the property that any framebuffer- to-texture copy results in a texture that is upside-down and backwards from Panda's usual convention; that is, it copies into a texture from the bottom up instead of from the top down.
If this is true, then on offscreen GraphicsBuffer created for the purposes of rendering into a texture should be created with the invert flag set true, to compensate. Panda will do this automatically if you create an offscreen buffer using GraphicsOutput::make_texture_buffer().
str getDriverRenderer | ( | ) |
int getDriverShaderVersionMajor | ( | ) |
int getDriverShaderVersionMinor | ( | ) |
str getDriverVendor | ( | ) |
str getDriverVersion | ( | ) |
int getDriverVersionMajor | ( | ) |
int getDriverVersionMinor | ( | ) |
GraphicsEngine getEngine | ( | ) |
Texture getFlashTexture | ( | ) |
float getGamma | ( | ) |
CoordinateSystem getInternalCoordinateSystem | ( | ) |
Loader getLoader | ( | ) |
Returns the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true.
int getMax2dTextureArrayLayers | ( | ) |
Returns the largest possible number of pages, or -1 if there is no particular limit.
Returns 0 if 2-d texture arrays not supported.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMax3dTextureDimension | ( | ) |
Returns the largest possible texture size in any one dimension for a 3-d texture, or -1 if there is no particular limit.
Returns 0 if 3-d textures are not supported.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxBufferTextureSize | ( | ) |
Returns the largest possible buffer texture size, or -1 if there is no particular limit.
Returns 0 if cube map textures are not supported.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxClipPlanes | ( | ) |
Returns the maximum number of simultaneous clip planes that may be applied to geometry, or -1 if there is no particular limit.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxColorTargets | ( | ) |
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture, as supported by this particular GSG.
If you exceed this number, the lowest-priority render targets will not be applied. Use RenderTarget::set_priority() to adjust the relative importance of the different render targets.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxCubeMapDimension | ( | ) |
Returns the largest possible texture size in any one dimension for a cube map texture, or -1 if there is no particular limit.
Returns 0 if cube map textures are not supported.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaximumSimultaneousRenderTargets | ( | ) |
Deprecated.
Use get_max_color_targets() instead, which returns the exact same value.
int getMaxLights | ( | ) |
Returns the maximum number of simultaneous lights that may be rendered on geometry, or -1 if there is no particular limit.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxTextureStages | ( | ) |
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturing, as supported by this particular GSG.
If you exceed this number, the lowest-priority texture stages will not be applied. Use TextureStage::set_priority() to adjust the relative importance of the different texture stages.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxVertexTransformIndices | ( | ) |
Returns the maximum number of transforms there may be in a single TransformTable for this graphics hardware.
If this number is 0 (but get_max_transforms() is nonzero), then the graphics hardware (or API) doesn't support indexed transforms, but can support direct transform references.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int getMaxVertexTransforms | ( | ) |
Returns the maximum number of transform matrices that may be simultaneously used to transform any one vertex by the graphics hardware.
If this number is 0, then the hardware (or the graphics backend) doesn't support soft- skinned vertices (in which case Panda will animate the vertices in software).
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
GraphicsPipe getPipe | ( | ) |
Returns the graphics pipe on which this GSG was created.
PreparedGraphicsObjects getPreparedObjects | ( | ) |
object getPreparedTextures | ( | ) |
bool getRuntimeColorScale | ( | ) |
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or color scale directly, without requiring any munging of vertices or tricks with lighting.
SceneSetup getScene | ( | ) |
ShaderGenerator getShaderGenerator | ( | ) |
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary.
GraphicsStateGuardian::ShaderModel getShaderModel | ( | ) |
Returns the ShaderModel.
bool getSupports2dTextureArray | ( | ) |
Returns true if this GSG can render 2-d textures array.
bool getSupports3dTexture | ( | ) |
Returns true if this GSG can render 3-d (volumetric) textures.
bool getSupportsBasicShaders | ( | ) |
Returns true if this particular GSG supports arbfp1+arbvp1 or above.
bool getSupportsBufferTexture | ( | ) |
Returns true if this GSG can render buffer textures.
bool getSupportsCgProfile | ( | str | name | ) |
bool getSupportsCompressedTexture | ( | ) |
Returns true if this GSG can compress textures as it loads them into texture memory, and/or accept pre-compressed textures for storing.
bool getSupportsComputeShaders | ( | ) |
Returns true if this particular GSG supports compute shaders.
bool getSupportsCubeMap | ( | ) |
Returns true if this GSG can render cube map textures.
bool getSupportsCubeMapArray | ( | ) |
Returns true if this GSG can render cube map arrays.
bool getSupportsDepthStencil | ( | ) |
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
This only returns true if the GSG supports the full packed depth-stencil functionality.
bool getSupportsDepthTexture | ( | ) |
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
This returns true if the GSG supports GL_DEPTH_COMPONENT textures, which are considered a limited but still valid case of F_depth_stencil.
bool getSupportsDualSourceBlending | ( | ) |
Returns true if dual source (incoming1_color and incoming1_alpha) blend operands are supported by this GSG.
bool getSupportsGenerateMipmap | ( | ) |
Returns true if this particular GSG can generate mipmaps for a texture automatically, or if they must be generated in software.
If this is true, then mipmaps can safely be enabled for rendered textures (e.g. using the MultitexReducer).
bool getSupportsGeometryInstancing | ( | ) |
Returns true if this particular GSG supports hardware geometry instancing: the ability to render multiple copies of a model.
In OpenGL, this is done using the EXT_draw_instanced extension.
bool getSupportsGeometryShaders | ( | ) |
Returns true if this particular GSG supports geometry shaders.
bool getSupportsGlsl | ( | ) |
Returns true if this particular GSG supports GLSL shaders.
bool getSupportsIndirectDraw | ( | ) |
Returns true if this particular GSG supports draw calls for which the information comes from a buffer.
bool getSupportsLuminanceTexture | ( | ) |
Returns true if this particular GSG supports luminance textures.
bool getSupportsOcclusionQuery | ( | ) |
Returns true if this GSG supports an occlusion query.
If this is true, then begin_occlusion_query() and end_occlusion_query() may be called to bracket a sequence of draw_triangles() (or whatever) calls to measure pixels that pass the depth test.
bool getSupportsSamplerObjects | ( | ) |
Returns true if this particular GSG supports the use of sampler objects to record texture sampling parameters separately from the texture objects.
This doesn't really affect functionality, but if this is false, it may mean that using the same texture with different SamplerState objects will result in reduced performance.
bool getSupportsStencil | ( | ) |
Returns true if this particular GSG supports stencil buffers at all.
bool getSupportsTessellationShaders | ( | ) |
Returns true if this particular GSG supports tesselation shaders.
bool getSupportsTexNonPow2 | ( | ) |
Returns true if this GSG can handle non power of two sized textures.
bool getSupportsTextureCombine | ( | ) |
Returns true if this particular GSG can use the TextureStage::M_combine mode, which includes all of the texture blend modes specified by set_combine_rgb() and/or set_combine_alpha().
If this is false, you must limit yourself to using the simpler blend modes.
bool getSupportsTextureDot3 | ( | ) |
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes.
bool getSupportsTextureSavedResult | ( | ) |
Returns true if this GSG can use the TextureStage::CS_last_saved_result source, which allows you to save the result of a TextureStage and re-use it for multiple inputs.
bool getSupportsTimerQuery | ( | ) |
Returns true if this GSG supports a timer query.
bool getSupportsTwoSidedStencil | ( | ) |
Returns true if this particular GSG supports two sided stencil: different stencil settings for the front and back side of the same polygon.
Texture::QualityLevel getTextureQualityOverride | ( | ) |
Returns the global quality_level override specified by set_texture_quality_override.
This is mainly useful for the tinydisplay software renderer. See Texture::set_quality_level().
const GraphicsThreadingModel getThreadingModel | ( | ) |
Returns the threading model that was used to create this GSG.
bool getTimerQueriesActive | ( | ) |
Returns true if timer queries are currently enabled on this GSG.
bool hasExtension | ( | str | extension | ) |
bool isActive | ( | ) |
Returns the active flag associated with the GraphicsStateGuardian.
bool isHardware | ( | ) |
Returns true if this GSG appears to be hardware-accelerated, or false if it is known to be software only.
bool isValid | ( | ) |
Returns true if the GSG has been correctly initialized within a graphics context, false if there has been some problem or it hasn't been initialized yet.
bool needsReset | ( | ) |
Returns true if the gsg is marked as needing a reset.
releaseAll | ( | ) |
Releases all prepared objects.
int releaseAllGeoms | ( | ) |
Frees the resources for all geoms associated with this GSG.
int releaseAllIndexBuffers | ( | ) |
Frees the resources for all index buffers associated with this GSG.
int releaseAllSamplers | ( | ) |
Frees the resources for all samplers associated with this GSG.
int releaseAllShaderBuffers | ( | ) |
Frees the resources for all index buffers associated with this GSG.
int releaseAllTextures | ( | ) |
Frees the resources for all textures associated with this GSG.
int releaseAllVertexBuffers | ( | ) |
Frees the resources for all vertex buffers associated with this GSG.
restoreGamma | ( | ) |
setActive | ( | bool | active | ) |
Sets the active flag associated with the GraphicsStateGuardian.
If the GraphicsStateGuardian is marked inactive, nothing is rendered. This is not normally turned off unless there is a problem with the rendering detected at a low level.
setCoordinateSystem | ( | CoordinateSystem | cs | ) |
setFlashTexture | ( | Texture | tex | ) |
bool setGamma | ( | float | gamma | ) |
setIncompleteRender | ( | bool | incomplete_render | ) |
Sets the incomplete_render flag.
When this is true, the frame will be rendered even if some of the geometry or textures in the scene are not available (e.g. they have been temporarily paged out). When this is false, the frame will be held up while this data is reloaded.
Setting this true allows for a smoother frame rate, but occasionally parts of the frame will be invisible or missing (they will generally come in within a second or two). Setting this false guarantees that every frame will be complete, but may cause more chugs as things are loaded up at runtime.
You may want to set this false during loading screens, to guarantee that all of your assets are available by the time you take the loading screen down.
This flag may also be set individually on each DisplayRegion. It will be considered true for a given DisplayRegion only if it is true on both the GSG and on the DisplayRegion.
setLoader | ( | Loader | loader | ) |
Sets the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true.
bool setScene | ( | SceneSetup | scene_setup | ) |
setShaderGenerator | ( | ShaderGenerator | shader_generator | ) |
Sets the ShaderGenerator object that will be used by this GSG to generate shaders when necessary.
setShaderModel | ( | GraphicsStateGuardian::ShaderModel | shader_model | ) |
Sets the ShaderModel.
This will override the auto- detected shader model during GSG reset. Useful for testing lower-end shaders.
setTextureQualityOverride | ( | Texture::QualityLevel | quality_level | ) |
Specifies the global quality_level to be imposed for all Textures rendered by this GSG.
This overrides the value set on individual textures via Texture::set_quality_level(). Set this to Texture::QL_default in order to allow the individual texture quality levels to be respected.
This is mainly useful for the tinydisplay software renderer. See Texture::set_quality_level().
bool active |
Returns the active flag associated with the GraphicsStateGuardian.
CoordinateSystem coordinate_system |
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.
bool copy_texture_inverted |
Returns true if this particular GSG has the property that any framebuffer- to-texture copy results in a texture that is upside-down and backwards from Panda's usual convention; that is, it copies into a texture from the bottom up instead of from the top down.
If this is true, then on offscreen GraphicsBuffer created for the purposes of rendering into a texture should be created with the invert flag set true, to compensate. Panda will do this automatically if you create an offscreen buffer using GraphicsOutput::make_texture_buffer().
String driver_renderer |
int driver_shader_version_major |
int driver_shader_version_minor |
String driver_vendor |
String driver_version |
int driver_version_major |
int driver_version_minor |
bool effective_incomplete_render |
Returns true if the GSG is effectively in incomplete_render state, considering both the GSG's incomplete_render and its current DisplayRegion's incomplete_render flags.
It only makes sense to call this during the draw traversal; at other times this return value will be meaningless.
See CullTraverser::get_effective_incomplete_render() for this same information during the cull traversal.
Texture flash_texture |
float gamma |
bool incomplete_render |
Returns the incomplete_render flag.
See set_incomplete_render().
Loader loader |
Returns the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true.
int max_2d_texture_array_layers |
z axis
int max_3d_texture_dimension |
Returns the largest possible texture size in any one dimension for a 3-d texture, or -1 if there is no particular limit.
Returns 0 if 3-d textures are not supported.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_buffer_texture_size |
Returns the largest possible buffer texture size, or -1 if there is no particular limit.
Returns 0 if cube map textures are not supported.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_clip_planes |
Returns the maximum number of simultaneous clip planes that may be applied to geometry, or -1 if there is no particular limit.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_color_targets |
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture, as supported by this particular GSG.
If you exceed this number, the lowest-priority render targets will not be applied. Use RenderTarget::set_priority() to adjust the relative importance of the different render targets.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_cube_map_dimension |
z axis
int max_lights |
Returns the maximum number of simultaneous lights that may be rendered on geometry, or -1 if there is no particular limit.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_texture_dimension |
Returns the largest possible texture size in any one dimension supported by the GSG, or -1 if there is no particular limit.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_texture_stages |
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturing, as supported by this particular GSG.
If you exceed this number, the lowest-priority texture stages will not be applied. Use TextureStage::set_priority() to adjust the relative importance of the different texture stages.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_vertex_transform_indices |
Returns the maximum number of transforms there may be in a single TransformTable for this graphics hardware.
If this number is 0 (but get_max_transforms() is nonzero), then the graphics hardware (or API) doesn't support indexed transforms, but can support direct transform references.
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_vertex_transforms |
Returns the maximum number of transform matrices that may be simultaneously used to transform any one vertex by the graphics hardware.
If this number is 0, then the hardware (or the graphics backend) doesn't support soft- skinned vertices (in which case Panda will animate the vertices in software).
The value returned may not be meaningful until after the graphics context has been fully created (e.g. the window has been opened).
int max_vertices_per_array |
Returns the maximum number of vertices that should be put into any one GeomVertexData object for use with this GSG.
int max_vertices_per_primitive |
Returns the maximum number of vertex indices that should be put into any one GeomPrimitive object for use with this GSG.
GraphicsPipe pipe |
Returns the graphics pipe on which this GSG was created.
PreparedGraphicsObjects prepared_objects |
SceneSetup scene |
ShaderGenerator shader_generator |
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary.
GraphicsStateGuardian::ShaderModel shader_model |
Returns the ShaderModel.
bool supports_2d_texture_array |
Returns true if this GSG can render 2-d textures array.
bool supports_3d_texture |
Returns true if this GSG can render 3-d (volumetric) textures.
bool supports_basic_shaders |
Returns true if this particular GSG supports arbfp1+arbvp1 or above.
bool supports_buffer_texture |
Returns true if this GSG can render buffer textures.
bool supports_compressed_texture |
Returns true if this GSG can compress textures as it loads them into texture memory, and/or accept pre-compressed textures for storing.
bool supports_compute_shaders |
Returns true if this particular GSG supports compute shaders.
bool supports_cube_map |
Returns true if this GSG can render cube map textures.
bool supports_cube_map_array |
Returns true if this GSG can render cube map arrays.
bool supports_depth_stencil |
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
This only returns true if the GSG supports the full packed depth-stencil functionality.
bool supports_depth_texture |
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
This returns true if the GSG supports GL_DEPTH_COMPONENT textures, which are considered a limited but still valid case of F_depth_stencil.
bool supports_dual_source_blending |
Returns true if dual source (incoming1_color and incoming1_alpha) blend operands are supported by this GSG.
bool supports_generate_mipmap |
Returns true if this particular GSG can generate mipmaps for a texture automatically, or if they must be generated in software.
If this is true, then mipmaps can safely be enabled for rendered textures (e.g. using the MultitexReducer).
bool supports_geometry_instancing |
Returns true if this particular GSG supports hardware geometry instancing: the ability to render multiple copies of a model.
In OpenGL, this is done using the EXT_draw_instanced extension.
bool supports_geometry_shaders |
Returns true if this particular GSG supports geometry shaders.
bool supports_glsl |
Returns true if this particular GSG supports GLSL shaders.
bool supports_hlsl |
Returns true if this particular GSG supports HLSL shaders.
bool supports_indirect_draw |
Returns true if this particular GSG supports draw calls for which the information comes from a buffer.
bool supports_luminance_texture |
Returns true if this particular GSG supports luminance textures.
bool supports_multisample |
bool supports_occlusion_query |
Returns true if this GSG supports an occlusion query.
If this is true, then begin_occlusion_query() and end_occlusion_query() may be called to bracket a sequence of draw_triangles() (or whatever) calls to measure pixels that pass the depth test.
bool supports_sampler_objects |
Returns true if this particular GSG supports the use of sampler objects to record texture sampling parameters separately from the texture objects.
This doesn't really affect functionality, but if this is false, it may mean that using the same texture with different SamplerState objects will result in reduced performance.
bool supports_shadow_filter |
Returns true if this particular GSG supports the filter mode FT_shadow for depth textures.
bool supports_stencil |
Returns true if this particular GSG supports stencil buffers at all.
bool supports_tessellation_shaders |
Returns true if this particular GSG supports tesselation shaders.
bool supports_tex_non_pow2 |
Returns true if this GSG can handle non power of two sized textures.
bool supports_texture_combine |
Returns true if this particular GSG can use the TextureStage::M_combine mode, which includes all of the texture blend modes specified by set_combine_rgb() and/or set_combine_alpha().
If this is false, you must limit yourself to using the simpler blend modes.
bool supports_texture_dot3 |
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes.
bool supports_texture_saved_result |
Returns true if this GSG can use the TextureStage::CS_last_saved_result source, which allows you to save the result of a TextureStage and re-use it for multiple inputs.
bool supports_texture_srgb |
Returns true if this GSG can handle sRGB textures.
bool supports_timer_query |
Returns true if this GSG supports a timer query.
bool supports_two_sided_stencil |
Returns true if this particular GSG supports two sided stencil: different stencil settings for the front and back side of the same polygon.
Texture::QualityLevel texture_quality_override |
Returns the global quality_level override specified by set_texture_quality_override.
This is mainly useful for the tinydisplay software renderer. See Texture::set_quality_level().
bool timer_queries_active |
Returns true if timer queries are currently enabled on this GSG.
bool valid |
Returns true if the GSG has been correctly initialized within a graphics context, false if there has been some problem or it hasn't been initialized yet.