22 _prepared_objects->release_all();
30 return _prepared_objects->release_all_textures();
38 return _prepared_objects->release_all_samplers();
46 return _prepared_objects->release_all_geoms();
54 return _prepared_objects->release_all_vertex_buffers();
62 return _prepared_objects->release_all_index_buffers();
70 return _prepared_objects->release_all_shader_buffers();
89 return _active && _is_valid;
132 _incomplete_render = incomplete_render;
140 return _incomplete_render;
155 return _effective_incomplete_render;
182 _shader_generator = shader_generator;
191 return _shader_generator;
207 return _threading_model;
227 return _prefers_triangle_strips;
236 return _max_vertices_per_array;
245 return _max_vertices_per_primitive;
260 if (max_texture_stages > 0) {
261 return (std::min)(_max_texture_stages, (int)max_texture_stages);
263 return _max_texture_stages;
275 return _max_texture_dimension;
288 return _max_3d_texture_dimension;
300 return _max_2d_texture_array_layers;
313 return _max_cube_map_dimension;
325 return _max_buffer_texture_size;
336 return _supports_texture_combine;
346 return _supports_texture_saved_result;
355 return _supports_texture_dot3;
363 return _supports_3d_texture;
371 return _supports_2d_texture_array;
379 return _supports_cube_map;
387 return _supports_buffer_texture;
395 return _supports_cube_map_array;
403 return _supports_tex_non_pow2;
411 return _supports_texture_srgb;
420 return _supports_compressed_texture;
430 return _compressed_texture_formats.
get_bit(compression_mode);
454 return _max_clip_planes;
469 return _max_vertex_transforms;
484 return _max_vertex_transform_indices;
502 return copy_texture_inverted;
506 return _copy_texture_inverted;
517 return _supports_generate_mipmap;
528 return _supports_depth_texture;
538 return _supports_depth_stencil;
546 return _supports_luminance_texture;
555 return _supports_shadow_filter;
567 return _supports_sampler_objects;
575 return _supports_basic_shaders;
583 return _supports_geometry_shaders;
591 return _supports_tessellation_shaders;
599 return _supports_compute_shaders;
607 return _supports_glsl;
615 return _supports_hlsl;
623 return _supports_stencil;
632 return _supports_two_sided_stencil;
642 return _supports_geometry_instancing;
651 return _supports_indirect_draw;
662 return _supports_occlusion_query;
670 return _supports_timer_query;
679 return _timer_queries_active;
697 if (max_color_targets > 0) {
698 return (std::min)(_max_color_targets, (int)max_color_targets);
700 return _max_color_targets;
709 return _supports_dual_source_blending;
726 return _shader_model;
735 if (shader_model <= _auto_detect_shader_model) {
736 _shader_model = shader_model;
747 return _color_scale_via_lighting;
757 return _alpha_scale_via_texture;
769 return _alpha_scale_via_texture &&
770 (tex_attrib ==
nullptr ||
780 if (_alpha_scale_texture_stage ==
nullptr) {
781 _alpha_scale_texture_stage =
new TextureStage(
"alpha-scale");
782 _alpha_scale_texture_stage->set_sort(1000000000);
784 return _alpha_scale_texture_stage;
794 return _runtime_color_scale;
804 return _coordinate_system;
818 _texture_quality_override = quality_level;
830 return _texture_quality_override;
861get_external_transform()
const {
862 return _inv_cs_transform->compose(_internal_transform);
871get_internal_transform()
const {
872 return _internal_transform;
880get_current_display_region()
const {
881 return _current_display_region;
888INLINE Lens::StereoChannel GraphicsStateGuardian::
889get_current_stereo_channel()
const {
890 return _current_stereo_channel;
897INLINE
int GraphicsStateGuardian::
898get_current_tex_view_offset()
const {
899 return _current_tex_view_offset;
906INLINE
const Lens *GraphicsStateGuardian::
907get_current_lens()
const {
908 return _current_lens;
915get_inv_cs_transform()
const {
916 return _inv_cs_transform;
923INLINE
void GraphicsStateGuardian::
925 _current_properties = prop;
bool get_bit(int index) const
Returns true if the nth bit is set, false if it is cleared.
bool has_value() const
Returns true if this variable has an explicit value, either from a prc file or locally set,...
A rectangular subregion within a window for rendering into.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
An object to create GraphicsOutputs that share a particular 3-D API.
get_incomplete_render
Returns the incomplete_render flag.
get_supports_depth_texture
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
get_max_lights
Returns the maximum number of simultaneous lights that may be rendered on geometry,...
int get_maximum_simultaneous_render_targets() const
Deprecated.
is_valid
Returns true if the GSG has been correctly initialized within a graphics context, false if there has ...
get_supports_3d_texture
Returns true if this GSG can render 3-d (volumetric) textures.
get_pipe
Returns the graphics pipe on which this GSG was created.
void release_all()
Releases all prepared objects.
int release_all_geoms()
Frees the resources for all geoms associated with this GSG.
get_supports_basic_shaders
Returns true if this particular GSG supports arbfp1+arbvp1 or above.
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 needs_reset() const
Returns true if the gsg is marked as needing a reset.
bool is_hardware() const
Returns true if this GSG appears to be hardware-accelerated, or false if it is known to be software o...
get_shader_model
Returns the ShaderModel.
get_max_vertices_per_primitive
Returns the maximum number of vertex indices that should be put into any one GeomPrimitive object for...
get_supports_2d_texture_array
Returns true if this GSG can render 2-d textures array.
get_supports_texture_combine
Returns true if this particular GSG can use the TextureStage::M_combine mode, which includes all of t...
get_max_vertices_per_array
Returns the maximum number of vertices that should be put into any one GeomVertexData object for use ...
get_texture_quality_override
Returns the global quality_level override specified by set_texture_quality_override.
get_max_texture_dimension
Returns the largest possible texture size in any one dimension supported by the GSG,...
set_active
Sets the active flag associated with the GraphicsStateGuardian.
get_supports_occlusion_query
Returns true if this GSG supports an occlusion query.
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.
get_supports_tex_non_pow2
Returns true if this GSG can handle non power of two sized textures.
is_active
Returns the active flag associated with the GraphicsStateGuardian.
virtual bool prefers_triangle_strips() const
Returns true if this GSG strongly prefers triangle strips to individual triangles (such as SGI),...
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 release_all_shader_buffers()
Frees the resources for all index buffers associated with this GSG.
get_supports_cube_map_array
Returns true if this GSG can render cube map arrays.
get_supports_generate_mipmap
Returns true if this particular GSG can generate mipmaps for a texture automatically,...
set_loader
Sets the Loader object that will be used by this GSG to load textures when necessary,...
get_max_vertex_transform_indices
Returns the maximum number of transforms there may be in a single TransformTable for this graphics ha...
get_supports_texture_srgb
Returns true if this GSG can handle sRGB textures.
get_max_buffer_texture_size
Returns the largest possible buffer texture size, or -1 if there is no particular limit.
set_shader_model
Sets the ShaderModel.
void mark_new()
Marks the GSG as "new", so that the next call to reset_if_new() will be effective.
get_max_2d_texture_array_layers
Returns the largest possible number of pages, or -1 if there is no particular limit.
get_supports_luminance_texture
Returns true if this particular GSG supports luminance textures.
get_copy_texture_inverted
Returns true if this particular GSG has the property that any framebuffer- to-texture copy results in...
get_supports_glsl
Returns true if this particular GSG supports GLSL shaders.
get_shader_generator
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary.
get_supports_compressed_texture
Returns true if this GSG can compress textures as it loads them into texture memory,...
get_supports_indirect_draw
Returns true if this particular GSG supports draw calls for which the information comes from a buffer...
get_supports_dual_source_blending
Returns true if dual source (incoming1_color and incoming1_alpha) blend operands are supported by thi...
get_supports_tessellation_shaders
Returns true if this particular GSG supports tesselation shaders.
get_effective_incomplete_render
Returns true if the GSG is effectively in incomplete_render state, considering both the GSG's incompl...
bool get_runtime_color_scale() const
Returns true if this particular GSG can implement (or would prefer to implement) set color and/or col...
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...
get_supports_timer_query
Returns true if this GSG supports a timer query.
get_supports_geometry_shaders
Returns true if this particular GSG supports geometry shaders.
get_supports_shadow_filter
Returns true if this particular GSG supports the filter mode FT_shadow for depth textures.
get_supports_stencil
Returns true if this particular GSG supports stencil buffers at all.
get_max_3d_texture_dimension
Returns the largest possible texture size in any one dimension for a 3-d texture, or -1 if there is n...
get_max_vertex_transforms
Returns the maximum number of transform matrices that may be simultaneously used to transform any one...
get_supports_compute_shaders
Returns true if this particular GSG supports compute shaders.
get_supports_geometry_instancing
Returns true if this particular GSG supports hardware geometry instancing: the ability to render mult...
get_max_texture_stages
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturi...
set_texture_quality_override
Specifies the global quality_level to be imposed for all Textures rendered by this GSG.
int release_all_samplers()
Frees the resources for all samplers associated with this GSG.
get_supports_two_sided_stencil
Returns true if this particular GSG supports two sided stencil: different stencil settings for the fr...
get_max_cube_map_dimension
Returns the largest possible texture size in any one dimension for a cube map texture,...
get_timer_queries_active
Returns true if timer queries are currently enabled on this GSG.
virtual void reset()
Resets all internal state as if the gsg were newly created.
get_supports_sampler_objects
Returns true if this particular GSG supports the use of sampler objects to record texture sampling pa...
int release_all_textures()
Frees the resources for all textures associated with this GSG.
get_supports_texture_dot3
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes.
int release_all_vertex_buffers()
Frees the resources for all vertex buffers associated with this GSG.
get_supports_texture_saved_result
Returns true if this GSG can use the TextureStage::CS_last_saved_result source, which allows you to s...
get_loader
Returns the Loader object that will be used by this GSG to load textures when necessary,...
get_max_color_targets
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture,...
get_supports_buffer_texture
Returns true if this GSG can render buffer textures.
set_incomplete_render
Sets the incomplete_render flag.
bool reset_if_new()
Calls reset() to initialize the GSG, but only if it hasn't been called yet.
get_coordinate_system
Returns the coordinate system in effect on this particular gsg.
get_supports_cube_map
Returns true if this GSG can render cube map textures.
set_shader_generator
Sets the ShaderGenerator object that will be used by this GSG to generate shaders when necessary.
get_supports_depth_stencil
Returns true if this particular GSG supports textures whose format is F_depth_stencil.
get_supports_hlsl
Returns true if this particular GSG supports HLSL shaders.
const GraphicsThreadingModel & get_threading_model() const
Returns the threading model that was used to create this GSG.
get_max_clip_planes
Returns the maximum number of simultaneous clip planes that may be applied to geometry,...
int release_all_index_buffers()
Frees the resources for all index buffers associated with this GSG.
This represents the user's specification of how a particular frame is handled by the various threads.
A base class for any number of different kinds of lenses, linear and otherwise.
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
Indicates the set of TextureStages and their associated Textures that should be applied to (or remove...
get_num_on_stages
Returns the number of stages that are turned on by the attribute.
Defines the properties of a named stage of the multitexture pipeline.