25 _prepared_objects->release_all();
36 return _prepared_objects->release_all_textures();
47 return _prepared_objects->release_all_samplers();
58 return _prepared_objects->release_all_geoms();
69 return _prepared_objects->release_all_vertex_buffers();
80 return _prepared_objects->release_all_index_buffers();
105 return _active && _is_valid;
161 _incomplete_render = incomplete_render;
172 return _incomplete_render;
190 return _effective_incomplete_render;
225 _shader_generator = shader_generator;
236 return _shader_generator;
258 return _threading_model;
284 return _prefers_triangle_strips;
296 return _max_vertices_per_array;
308 return _max_vertices_per_primitive;
328 if (max_texture_stages > 0) {
329 return min(_max_texture_stages, (
int)max_texture_stages);
331 return _max_texture_stages;
347 return _max_texture_dimension;
364 return _max_3d_texture_dimension;
380 return _max_2d_texture_array_layers;
397 return _max_cube_map_dimension;
412 return _supports_texture_combine;
425 return _supports_texture_saved_result;
437 return _supports_texture_dot3;
448 return _supports_3d_texture;
459 return _supports_2d_texture_array;
469 return _supports_cube_map;
480 return _supports_tex_non_pow2;
490 return _supports_texture_srgb;
502 return _supports_compressed_texture;
515 return _compressed_texture_formats.
get_bit(compression_mode);
547 return _max_clip_planes;
566 return _max_vertex_transforms;
585 return _max_vertex_transform_indices;
609 return copy_texture_inverted;
613 return _copy_texture_inverted;
627 return _supports_generate_mipmap;
641 return _supports_depth_texture;
654 return _supports_depth_stencil;
665 return _supports_shadow_filter;
681 return _supports_sampler_objects;
692 return _supports_basic_shaders;
703 return _supports_geometry_shaders;
714 return _supports_tessellation_shaders;
725 return _supports_compute_shaders;
736 return _supports_glsl;
747 return _supports_stencil;
759 return _supports_two_sided_stencil;
772 return _supports_geometry_instancing;
786 return _supports_occlusion_query;
796 return _supports_timer_query;
808 return _timer_queries_active;
831 if (max_color_targets > 0) {
832 return min(_max_color_targets, (
int)max_color_targets);
834 return _max_color_targets;
855 return _shader_model;
867 if (shader_model <= _auto_detect_shader_model) {
868 _shader_model = shader_model;
882 return _color_scale_via_lighting;
895 return _alpha_scale_via_texture;
910 return _alpha_scale_via_texture &&
924 if (_alpha_scale_texture_stage == (
TextureStage *)NULL) {
925 _alpha_scale_texture_stage =
new TextureStage(
"alpha-scale");
926 _alpha_scale_texture_stage->set_sort(1000000000);
928 return _alpha_scale_texture_stage;
941 return _runtime_color_scale;
954 return _coordinate_system;
972 _texture_quality_override = quality_level;
986 return _texture_quality_override;
1013 _needs_reset =
true;
1025 INLINE CPT(TransformState) GraphicsStateGuardian::
1026 get_external_transform()
const {
1027 return _inv_cs_transform->compose(_internal_transform);
1039 INLINE CPT(TransformState) GraphicsStateGuardian::
1040 get_internal_transform()
const {
1041 return _internal_transform;
1051 get_current_display_region()
const {
1052 return _current_display_region;
1061 INLINE Lens::StereoChannel GraphicsStateGuardian::
1062 get_current_stereo_channel()
const {
1063 return _current_stereo_channel;
1073 INLINE
int GraphicsStateGuardian::
1074 get_current_tex_view_offset()
const {
1075 return _current_tex_view_offset;
1085 INLINE
const Lens *GraphicsStateGuardian::
1086 get_current_lens()
const {
1087 return _current_lens;
1096 INLINE CPT(TransformState) GraphicsStateGuardian::
1097 get_inv_cs_transform()
const {
1098 return _inv_cs_transform;
1107 INLINE
void GraphicsStateGuardian::
1109 _current_properties = prop;
void set_texture_quality_override(Texture::QualityLevel quality_level)
Specifies the global quality_level to be imposed for all Textures rendered by this GSG...
bool get_supports_depth_stencil() const
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
bool get_supports_texture_combine() const
Returns true if this particular GSG can use the TextureStage::M_combine mode, which includes all of t...
virtual bool get_effective_incomplete_render() const
Returns true if the GSG is effectively in incomplete_render state, considering both the GSG's incompl...
virtual int get_max_texture_dimension() const
Returns the largest possible texture size in any one dimension supported by the GSG, or -1 if there is no particular limit.
bool get_supports_texture_saved_result() const
Returns true if this GSG can use the TextureStage::CS_last_saved_result source, which allows you to s...
bool get_runtime_color_scale() const
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or col...
void set_loader(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 get_supports_geometry_instancing() const
Returns true if this particular GSG supports hardware geometry instancing: the ability to render mult...
int get_max_2d_texture_array_layers() const
Returns the largest possible number of pages, or -1 if there is no particular limit.
virtual bool prefers_triangle_strips() const
Returns true if this GSG strongly prefers triangle strips to individual triangles (such as SGI)...
A base class for any number of different kinds of lenses, linear and otherwise.
bool get_color_scale_via_lighting() const
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or col...
int get_maximum_simultaneous_render_targets() const
Deprecated.
GraphicsPipe * get_pipe() const
Returns the graphics pipe on which this GSG was created.
bool get_supports_shadow_filter() const
Returns true if this particular GSG supports the filter mode FT_shadow for depth textures.
bool get_supports_occlusion_query() const
Returns true if this GSG supports an occlusion query.
bool get_supports_glsl() const
Returns true if this particular GSG supports GLSL shaders.
virtual int get_max_vertices_per_primitive() const
Returns the maximum number of vertex indices that should be put into any one GeomPrimitive object for...
void release_all()
Releases all prepared objects.
bool get_supports_depth_texture() const
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
bool reset_if_new()
Calls reset() to initialize the GSG, but only if it hasn't been called yet.
int release_all_textures()
Frees the resources for all textures associated with this GSG.
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
ShaderGenerator * get_shader_generator() const
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary...
int get_max_lights() const
Returns the maximum number of simultaneous lights that may be rendered on geometry, or -1 if there is no particular limit.
void set_shader_model(int shader_model)
Sets the ShaderModel.
CoordinateSystem get_coordinate_system() const
Returns the coordinate system in effect on this particular gsg.
void set_active(bool active)
Sets the active flag associated with the GraphicsStateGuardian.
bool get_supports_compressed_texture() const
Returns true if this GSG can compress textures as it loads them into texture memory, and/or accept pre-compressed textures for storing.
bool get_supports_generate_mipmap() const
Returns true if this particular GSG can generate mipmaps for a texture automatically, or if they must be generated in software.
bool is_hardware() const
Returns true if this GSG appears to be hardware-accelerated, or false if it is known to be software o...
int get_shader_model() const
Returns the ShaderModel.
Loader * get_loader() const
Returns the Loader object that will be used by this GSG to load textures when necessary, if get_incomplete_render() is true.
bool get_alpha_scale_via_texture() const
Returns true if this particular GSG can implement (or would prefer to implement) an alpha scale via a...
int get_max_clip_planes() const
Returns the maximum number of simultaneous clip planes that may be applied to geometry, or -1 if there is no particular limit.
Indicates the set of TextureStages and their associated Textures that should be applied to (or remove...
bool get_supports_texture_srgb() const
Returns true if this GSG can handle sRGB textures.
int get_max_3d_texture_dimension() const
Returns the largest possible texture size in any one dimension for a 3-d texture, or -1 if there is n...
int get_max_vertex_transforms() const
Returns the maximum number of transform matrices that may be simultaneously used to transform any one...
bool get_bit(int index) const
Returns true if the nth bit is set, false if it is cleared.
int get_max_texture_stages() const
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturi...
Texture::QualityLevel get_texture_quality_override() const
Returns the global quality_level override specified by set_texture_quality_override.
void set_incomplete_render(bool incomplete_render)
Sets the incomplete_render flag.
void mark_new()
Marks the GSG as "new", so that the next call to reset_if_new() will be effective.
int get_max_cube_map_dimension() const
Returns the largest possible texture size in any one dimension for a cube map texture, or -1 if there is no particular limit.
bool get_supports_geometry_shaders() const
Returns true if this particular GSG supports geometry shaders.
An object to create GraphicsOutputs that share a particular 3-D API.
The ShaderGenerator is a device that effectively replaces the classic fixed function pipeline with a ...
bool get_supports_timer_query() const
Returns true if this GSG supports a timer query.
This represents the user's specification of how a particular frame is handled by the various threads...
bool is_active() const
Returns the active flag associated with the GraphicsStateGuardian.
int get_max_color_targets() const
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture...
bool get_supports_2d_texture_array() const
Returns true if this GSG can render 2-d textures array.
int release_all_geoms()
Frees the resources for all geoms associated with this GSG.
virtual bool get_supports_compressed_texture_format(int compression_mode) const
Returns true if this GSG can accept textures pre-compressed in the indicated format.
bool get_supports_tessellation_shaders() const
Returns true if this particular GSG supports tesselation shaders.
bool get_supports_sampler_objects() const
Returns true if this particular GSG supports the use of sampler objects to record texture sampling pa...
bool get_timer_queries_active() const
Returns true if timer queries are currently enabled on this GSG.
bool has_value() const
Returns true if this variable has an explicit value, either from a prc file or locally set...
bool get_supports_stencil() const
Returns true if this particular GSG supports stencil buffers at all.
void set_shader_generator(ShaderGenerator *shader_generator)
Sets the ShaderGenerator object that will be used by this GSG to generate shaders when necessary...
virtual bool get_incomplete_render() const
Returns the incomplete_render flag.
bool get_supports_basic_shaders() const
Returns true if this particular GSG supports arbfp1+arbvp1 or above.
bool is_valid() const
Returns true if the GSG has been correctly initialized within a graphics context, false if there has ...
int release_all_index_buffers()
Frees the resources for all index buffers associated with this GSG.
bool get_copy_texture_inverted() const
Returns true if this particular GSG has the property that any framebuffer-to-texture copy results in ...
A rectangular subregion within a window for rendering into.
bool needs_reset() const
Returns true if the gsg is marked as needing a reset.
int release_all_vertex_buffers()
Frees the resources for all vertex buffers associated with this GSG.
int release_all_samplers()
Frees the resources for all samplers associated with this GSG.
bool get_supports_compute_shaders() const
Returns true if this particular GSG supports compute shaders.
int get_max_vertex_transform_indices() const
Returns the maximum number of transforms there may be in a single TransformTable for this graphics ha...
virtual void reset()
Resets all internal state as if the gsg were newly created.
virtual int get_max_vertices_per_array() const
Returns the maximum number of vertices that should be put into any one GeomVertexData object for use ...
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
Defines the properties of a named stage of the multitexture pipeline.
static TextureStage * get_alpha_scale_texture_stage()
Returns the TextureStage that will be used to apply an alpha scale, if get_alpha_scale_via_texture() ...
bool get_supports_two_sided_stencil() const
Returns true if this particular GSG supports two sided stencil: different stencil settings for the fr...
bool get_supports_texture_dot3() const
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes...
const GraphicsThreadingModel & get_threading_model() const
Returns the threading model that was used to create this GSG.
bool get_supports_3d_texture() const
Returns true if this GSG can render 3-d (volumetric) textures.
bool get_supports_cube_map() const
Returns true if this GSG can render cube map textures.
bool get_supports_tex_non_pow2() const
Returns true if this GSG can handle non power of two sized textures.