17#ifndef GRAPHICSSTATEGUARDIAN_H
18#define GRAPHICSSTATEGUARDIAN_H
68 GraphicsStateGuardian(CoordinateSystem internal_coordinate_system,
69 GraphicsEngine *engine, GraphicsPipe *pipe);
70 virtual ~GraphicsStateGuardian();
114 INLINE GraphicsPipe *
get_pipe()
const;
248 virtual bool set_gamma(PN_stdfloat gamma);
258 EXTENSION(PyObject *get_prepared_textures()
const);
259 typedef bool TextureCallback(
TextureContext *tc,
void *callback_arg);
262#if !defined(NDEBUG) || !defined(CPPPARSER)
270 virtual bool has_extension(
const std::string &extension)
const;
337 LMatrix4 &t,
int index);
398 virtual
void reset();
405 INLINE const
DisplayRegion *get_current_display_region() const;
406 INLINE
Lens::StereoChannel get_current_stereo_channel() const;
407 INLINE
int get_current_tex_view_offset() const;
408 INLINE const
Lens *get_current_lens() const;
416 void do_issue_color_scale();
431 static
void create_gamma_table (PN_stdfloat gamma,
unsigned short *red_table,
unsigned short *green_table,
unsigned short *blue_table);
440 static void init_frame_pstats();
444 virtual void reissue_transforms();
446 virtual void enable_lighting(
bool enable);
447 virtual void set_ambient_light(
const LColor &color);
448 virtual void enable_light(
int light_id,
bool enable);
449 virtual void begin_bind_lights();
450 virtual void end_bind_lights();
452 virtual void enable_clip_planes(
bool enable);
453 virtual void enable_clip_plane(
int plane_id,
bool enable);
454 virtual void begin_bind_clip_planes();
455 virtual void bind_clip_plane(
const NodePath &plane,
int plane_id);
456 virtual void end_bind_clip_planes();
458 void determine_target_texture();
459 void determine_target_shader();
461 virtual void free_pointers();
462 virtual void close_gsg();
463 void panic_deactivate();
465 void determine_light_color_scale();
489 RenderState::SlotMask _state_mask;
490 RenderState::SlotMask _inv_state_mask;
513 unsigned int _color_write_mask;
516 Lens::StereoChannel _current_stereo_channel;
517 int _current_tex_view_offset;
518 CPT(
Lens) _current_lens;
523 CoordinateSystem _coordinate_system;
524 CoordinateSystem _internal_coordinate_system;
528 LColor _scene_graph_color;
529 bool _has_scene_graph_color;
530 bool _transform_stale;
531 bool _color_blend_involves_color_scale;
532 bool _texture_involves_color_scale;
533 bool _vertex_colors_enabled;
534 bool _lighting_enabled;
535 bool _clip_planes_enabled;
536 bool _color_scale_enabled;
537 LVecBase4 _current_color_scale;
539 bool _has_material_force_color;
540 LColor _material_force_color;
541 LVecBase4 _light_color_scale;
542 bool _has_texture_alpha_scale;
544 bool _tex_gen_modifies_mat;
545 bool _tex_gen_point_sprite;
546 int _last_max_stage_index;
552 bool _incomplete_render;
553 bool _effective_incomplete_render;
559 bool _prefers_triangle_strips;
560 int _max_vertices_per_array;
561 int _max_vertices_per_primitive;
563 int _max_texture_stages;
564 int _max_texture_dimension;
565 int _max_3d_texture_dimension;
566 int _max_2d_texture_array_layers;
567 int _max_cube_map_dimension;
568 int _max_buffer_texture_size;
570 bool _supports_texture_combine;
571 bool _supports_texture_saved_result;
572 bool _supports_texture_dot3;
574 bool _supports_3d_texture;
575 bool _supports_2d_texture_array;
576 bool _supports_cube_map;
577 bool _supports_buffer_texture;
578 bool _supports_cube_map_array;
579 bool _supports_tex_non_pow2;
580 bool _supports_texture_srgb;
582 bool _supports_compressed_texture;
583 BitMask32 _compressed_texture_formats;
586 int _max_clip_planes;
588 int _max_vertex_transforms;
589 int _max_vertex_transform_indices;
591 bool _supports_occlusion_query;
594 bool _supports_timer_query;
596 int _pstats_gpu_thread;
597 bool _timer_queries_active;
600 int _last_query_frame;
601 int _last_num_queried;
604 TimerQueryQueue _pending_timer_queries;
607 bool _copy_texture_inverted;
608 bool _supports_multisample;
609 bool _supports_generate_mipmap;
610 bool _supports_depth_texture;
611 bool _supports_depth_stencil;
612 bool _supports_luminance_texture;
613 bool _supports_shadow_filter;
614 bool _supports_sampler_objects;
615 bool _supports_basic_shaders;
616 bool _supports_geometry_shaders;
617 bool _supports_tessellation_shaders;
618 bool _supports_compute_shaders;
621 bool _supports_framebuffer_multisample;
622 bool _supports_framebuffer_blit;
624 bool _supports_stencil;
625 bool _supports_stencil_wrap;
626 bool _supports_two_sided_stencil;
627 bool _supports_geometry_instancing;
628 bool _supports_indirect_draw;
630 int _max_color_targets;
631 bool _supports_dual_source_blending;
633 int _supported_geom_rendering;
634 bool _color_scale_via_lighting;
635 bool _alpha_scale_via_texture;
636 bool _runtime_color_scale;
638 int _stereo_buffer_mask;
640 ShaderModel _auto_detect_shader_model;
641 ShaderModel _shader_model;
648 Texture::QualityLevel _texture_quality_override;
655 PT(
Texture) _flash_texture_unused;
722 static PStatCollector _draw_set_state_shader_parameters_pcollector;
733 int _num_lights_enabled;
734 int _num_clip_planes_enabled;
736 PT(GraphicsPipe) _pipe;
737 GraphicsEngine *_engine;
746 static void init_type() {
747 GraphicsStateGuardianBase::init_type();
749 GraphicsStateGuardianBase::get_class_type());
751 virtual TypeHandle get_type()
const {
752 return get_class_type();
754 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
757 static TypeHandle _type_handle;
759 friend class GraphicsPipe;
760 friend class GraphicsWindow;
761 friend class GraphicsEngine;
764EXPCL_PANDA_DISPLAY std::ostream &operator << (std::ostream &out, GraphicsStateGuardian::ShaderModel sm);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class represents a thread-safe handle to a promised future result of an asynchronous operation,...
This is a base class for those kinds of SavedContexts that occupy an easily-measured (and substantial...
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
A light shining from infinitely far away in a particular direction, like sunlight.
Encapsulates the data from a DisplayRegion, pre-fetched for one stage of the pipeline.
A rectangular subregion within a window for rendering into.
This is a base class for GraphicsWindow (actually, GraphicsOutput) and DisplayRegion,...
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
This is a special class object that holds all the information returned by a particular GSG to indicat...
Objects of this class are used to convert vertex data from a Geom into a format suitable for passing ...
Encapsulates the data from a Geom, pre-fetched for one stage of the pipeline.
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
This is the data for one array of a GeomVertexData structure.
Encapsulates the data from a GeomVertexData, pre-fetched for one stage of the pipeline.
A container for geometry primitives.
This class is the main interface to controlling the render process.
An abstract base class for GraphicsOutput, for all the usual reasons.
This is a base class for the various different classes that represent the result of a frame of render...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
virtual bool framebuffer_copy_to_ram(Texture *tex, int view, int z, const DisplayRegion *dr, const RenderBuffer &rb)
Copy the pixels within the indicated display region from the framebuffer into system memory,...
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.
virtual bool draw_points(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of disconnected points.
virtual bool draw_trifans(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of triangle fans.
virtual void clear_before_callback()
Resets any non-standard graphics state that might give a callback apoplexy.
virtual ConstPointerTo< TransformState > get_cs_transform_for(CoordinateSystem cs) const
Returns what the cs_transform would be set to after a call to set_coordinate_system(cs).
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.
virtual bool depth_offset_decals()
Returns true if this GSG can implement decals using a DepthOffsetAttrib, or false if that is unreliab...
void release_all()
Releases all prepared objects.
PointerTo< Texture > get_dummy_shadow_map(Texture::TextureType texture_type) const
Returns a dummy shadow map that can be used for a light of the given type that does not cast shadows.
get_gamma
Get the current gamma setting.
virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader, const GeomVertexDataPipelineReader *data_reader, bool force)
Called before a sequence of draw_primitive() functions are called, this should prepare the vertex dat...
int release_all_geoms()
Frees the resources for all geoms associated with this GSG.
virtual bool update_texture(TextureContext *tc, bool force)
Ensures that the current Texture data is refreshed onto the GSG.
get_supports_basic_shaders
Returns true if this particular GSG supports arbfp1+arbvp1 or above.
set_scene
Sets the SceneSetup object that indicates the initial camera position, etc.
PointerTo< Texture > fetch_specified_texture(Shader::ShaderTexSpec &spec, SamplerState &sampler, int &view)
Like fetch_specified_value, but for texture inputs.
GraphicsEngine * get_engine() const
Returns the graphics engine that created this GSG.
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() ...
virtual TextureContext * prepare_texture(Texture *tex, int view)
Creates whatever structures the GSG requires to represent the texture internally, and returns a newly...
bool needs_reset() const
Returns true if the gsg is marked as needing a reset.
get_supports_multisample
Returns true if this particular GSG supports using the multisample bits to provide antialiasing,...
bool is_hardware() const
Returns true if this GSG appears to be hardware-accelerated, or false if it is known to be software o...
virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of disconnected triangles.
get_shader_model
Returns the ShaderModel.
get_driver_version_minor
Returns the minor version of the video driver.
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.
virtual void bind_light(PointLight *light_obj, const NodePath &light, int light_id)
Called the first time a particular light has been bound to a given id within a frame,...
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.
virtual bool draw_lines(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of disconnected line segments.
get_max_texture_dimension
Returns the largest possible texture size in any one dimension supported by the GSG,...
virtual void release_shader_buffer(BufferContext *ibc)
Frees the resources previously allocated via a call to prepare_data(), including deleting the BufferC...
set_active
Sets the active flag associated with the GraphicsStateGuardian.
get_supports_occlusion_query
Returns true if this GSG supports an occlusion query.
void traverse_prepared_textures(TextureCallback *func, void *callback_arg)
Calls the indicated function on all currently-prepared textures, or until the callback function retur...
get_flash_texture
Returns the current "flash texture", if any, or NULL if none.
virtual bool prepare_lens()
Makes the current lens (whichever lens was most recently specified with set_scene()) active,...
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.
static void create_gamma_table(PN_stdfloat gamma, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table)
Create a gamma table.
virtual void clear_state_and_transform()
Forgets the current graphics state and current transform, so that the next call to set_state_and_tran...
get_driver_vendor
Returns the vendor of the video card driver.
virtual ConstPointerTo< RenderState > begin_decal_base_first()
Called during draw to begin a three-step rendering phase to draw decals.
virtual VertexBufferContext * prepare_vertex_buffer(GeomVertexArrayData *data)
Prepares the indicated buffer for retained-mode rendering.
get_supports_generate_mipmap
Returns true if this particular GSG can generate mipmaps for a texture automatically,...
virtual bool draw_patches(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of "patches", which can only be processed by a tessellation shader.
set_loader
Sets the Loader object that will be used by this GSG to load textures when necessary,...
virtual ConstPointerTo< RenderState > begin_decal_nested()
Called during draw to begin a three-step rendering phase to draw decals.
virtual bool framebuffer_copy_to_texture(Texture *tex, int view, int z, const DisplayRegion *dr, const RenderBuffer &rb)
Copy the pixels within the indicated display region from the framebuffer into texture memory.
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.
virtual void prepare_display_region(DisplayRegionPipelineReader *dr)
Makes the specified DisplayRegion current.
get_driver_shader_version_minor
Returns the minor version of the shader model.
get_max_buffer_texture_size
Returns the largest possible buffer texture size, or -1 if there is no particular limit.
virtual void release_sampler(SamplerContext *sc)
Frees the resources previously allocated via a call to prepare_sampler(), including deleting the Samp...
get_prepared_objects
Returns the set of texture and geom objects that have been prepared with this GSG (and possibly other...
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.
PointerTo< Texture > get_shadow_map(const NodePath &light_np, GraphicsOutputBase *host=nullptr)
Returns a shadow map for the given light source.
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.
virtual void do_issue_light()
This implementation of do_issue_light() assumes we have a limited number of hardware lights available...
get_driver_renderer
Returns GL_Renderer.
void flush_timer_queries()
Called by the graphics engine on the draw thread to check the status of the running timer queries and...
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.
virtual void release_vertex_buffer(VertexBufferContext *vbc)
Frees the resources previously allocated via a call to prepare_data(), including deleting the VertexB...
get_shader_generator
Returns the ShaderGenerator object that will be used by this GSG to generate shaders when necessary.
void do_issue_color()
This method is defined in the base class because it is likely that this functionality will be used fo...
get_supports_compressed_texture
Returns true if this GSG can compress textures as it loads them into texture memory,...
const LMatrix4 * fetch_specified_part(Shader::ShaderMatInput input, InternalName *name, LMatrix4 &t, int index)
See fetch_specified_value.
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...
virtual CoordinateSystem get_internal_coordinate_system() const
Returns the coordinate system used internally by the GSG.
virtual bool extract_texture_data(Texture *tex)
This method should only be called by the GraphicsEngine.
const LMatrix4 * fetch_specified_member(const NodePath &np, CPT_InternalName member, LMatrix4 &t)
Given a NodePath passed into a shader input that is a structure, fetches the value for the given memb...
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...
virtual PointerTo< GeomMunger > get_geom_munger(const RenderState *state, Thread *current_thread)
Looks up or creates a GeomMunger object to munge vertices appropriate to this GSG for the indicated s...
get_driver_version_major
Returns major version of the video driver.
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_driver_shader_version_major
Returns the major version of the shader model.
virtual void release_geom(GeomContext *gc)
Frees the resources previously allocated via a call to prepare_geom(), including deleting the GeomCon...
get_supports_geometry_shaders
Returns true if this particular GSG supports geometry shaders.
virtual ConstPointerTo< TransformState > get_cs_transform() const
Returns a transform that converts from the GSG's external coordinate system (as returned by get_coord...
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...
virtual SamplerContext * prepare_sampler(const SamplerState &sampler)
Creates whatever structures the GSG requires to represent the sampler internally, and returns a newly...
RenderBuffer get_render_buffer(int buffer_type, const FrameBufferProperties &prop)
Returns a RenderBuffer object suitable for operating on the requested set of buffers.
virtual void ensure_generated_shader(const RenderState *state)
Ensures that an appropriate shader has been generated for the given state.
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.
virtual ConstPointerTo< RenderState > begin_decal_base_second()
Called during draw to begin a three-step rendering phase to draw decals.
get_supports_geometry_instancing
Returns true if this particular GSG supports hardware geometry instancing: the ability to render mult...
const Shader::ShaderPtrData * fetch_ptr_parameter(const Shader::ShaderPtrSpec &spec)
Return a pointer to struct ShaderPtrData.
virtual GraphicsOutput * make_shadow_buffer(LightLensNode *light, Texture *tex, GraphicsOutput *host)
Creates a depth buffer for shadow mapping.
get_max_texture_stages
Returns the maximum number of simultaneous textures that may be applied to geometry with multitexturi...
virtual void end_frame(Thread *current_thread)
Called after each frame is rendered, to allow the GSG a chance to do any internal cleanup after rende...
set_texture_quality_override
Specifies the global quality_level to be imposed for all Textures rendered by this GSG.
virtual bool draw_lines_adj(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of disconnected line segments with adjacency information.
int release_all_samplers()
Frees the resources for all samplers associated with this GSG.
virtual bool has_extension(const std::string &extension) const
Returns true if the GSG implements the extension identified by the given string.
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,...
virtual bool draw_linestrips_adj(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of line strips with adjacency information.
virtual void end_scene()
Called between begin_frame() and end_frame() to mark the end of drawing commands for a "scene" (usual...
get_timer_queries_active
Returns true if timer queries are currently enabled on this GSG.
virtual void release_shader(ShaderContext *sc)
Releases the resources allocated by prepare_shader.
void do_issue_clip_plane()
This is fundametically similar to do_issue_light(), with calls to apply_clip_plane() and enable_clip_...
virtual GeomContext * prepare_geom(Geom *geom)
Prepares the indicated Geom for retained-mode rendering, by creating whatever structures are necessar...
virtual void reset()
Resets all internal state as if the gsg were newly created.
virtual PointerTo< OcclusionQueryContext > end_occlusion_query()
Ends a previous call to begin_occlusion_query().
virtual ConstPointerTo< TransformState > calc_projection_mat(const Lens *lens)
Given a lens, this function calculates the appropriate projection matrix for this gsg.
virtual int get_supported_geom_rendering() const
Returns the union of Geom::GeomRendering values that this particular GSG can support directly.
get_supports_sampler_objects
Returns true if this particular GSG supports the use of sampler objects to record texture sampling pa...
virtual void release_texture(TextureContext *tc)
Frees the resources previously allocated via a call to prepare_texture(), including deleting the Text...
get_driver_version
Returns driver version This has an implementation-defined meaning, and may be "" if the particular gr...
PN_stdfloat compute_distance_to(const LPoint3 &point) const
This function will compute the distance to the indicated point, assumed to be in eye coordinates,...
virtual void begin_occlusion_query()
Begins a new occlusion query.
const LMatrix4 * fetch_specified_value(Shader::ShaderMatSpec &spec, int altered)
The gsg contains a large number of useful matrices:
virtual IndexBufferContext * prepare_index_buffer(GeomPrimitive *data)
Prepares the indicated buffer for retained-mode rendering.
virtual void finish_decal()
Called during draw to clean up after decals are finished.
virtual bool draw_tristrips(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of triangle strips.
int release_all_textures()
Frees the resources for all textures associated with this GSG.
get_scene
Returns the current SceneSetup object.
get_supports_texture_dot3
Returns true if this GSG can use the TextureStage::CM_dot3_rgb or CM_dot3_rgba combine modes.
set_flash_texture
Sets the "flash texture".
virtual bool draw_linestrips(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of line strips.
virtual void set_state_and_transform(const RenderState *state, const TransformState *transform)
Simultaneously resets the render state and the transform state.
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...
virtual bool get_supports_cg_profile(const std::string &name) const
Returns true if this particular GSG supports the specified Cg Shader Profile.
virtual bool draw_tristrips_adj(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of triangle strips with adjacency information.
get_loader
Returns the Loader object that will be used by this GSG to load textures when necessary,...
virtual void clear(DrawableRegion *clearable)
Clears the framebuffer within the current DisplayRegion, according to the flags indicated by the give...
get_max_color_targets
Returns the maximum number of simultaneous color textures that may be attached for render-to-texture,...
virtual bool begin_frame(Thread *current_thread)
Called before each frame is rendered, to allow the GSG a chance to do any internal cleanup before beg...
set_coordinate_system
Changes the coordinate system in effect on this particular gsg.
get_supports_buffer_texture
Returns true if this GSG can render buffer textures.
virtual PointerTo< TimerQueryContext > issue_timer_query(int pstats_index)
Adds a timer query to the command stream, associated with the given PStats collector index.
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.
virtual BufferContext * prepare_shader_buffer(ShaderBuffer *data)
Prepares the indicated buffer for retained-mode rendering.
virtual void remove_window(GraphicsOutputBase *window)
This is simply a transparent call to GraphicsEngine::remove_window().
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.
virtual void restore_gamma()
Restore original gamma setting.
virtual bool draw_triangles_adj(const GeomPrimitivePipelineReader *reader, bool force)
Draws a series of disconnected triangles with adjacency information.
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.
virtual void dispatch_compute(int size_x, int size_y, int size_z)
Dispatches a currently bound compute shader using the given work group counts.
virtual void release_index_buffer(IndexBufferContext *ibc)
Frees the resources previously allocated via a call to prepare_data(), including deleting the IndexBu...
virtual PointerTo< GeomMunger > make_geom_munger(const RenderState *state, Thread *current_thread)
Creates a new GeomMunger object to munge vertices appropriate to this GSG for the indicated state.
void clear_flash_texture()
Resets the "flash texture", so that no textures will flash.
virtual void end_draw_primitives()
Called after a sequence of draw_primitive() functions are called, this should do whatever cleanup is ...
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.
virtual ShaderContext * prepare_shader(Shader *shader)
Compile a vertex/fragment shader body.
virtual bool begin_scene()
Called between begin_frame() and end_frame() to mark the beginning of drawing commands for a "scene" ...
This represents the user's specification of how a particular frame is handled by the various threads.
This is a special class object that holds all the information returned by a particular GSG to indicat...
Encodes a string name in a hash table, mapping it to a pointer.
A base class for any number of different kinds of lenses, linear and otherwise.
A derivative of Light and of Camera.
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Returned from a GSG in response to begin_occlusion_query() .
A lightweight class that represents a single element that may be timed and/or counted via stats.
Contains the raw timing and level data for a single frame.
A light originating from a single point in space, and shining in all directions.
A table of objects that are saved within the graphics context for reference by handle later.
A RenderBuffer is an arbitrary subset of the various layers (depth buffer, color buffer,...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
This is a special class object that holds a handle to the sampler state object given by the graphics ...
Represents a set of settings that indicate how a texture is sampled.
This object holds the camera position, etc., and other general setup information for rendering a part...
This is a generic buffer object that lives in graphics memory.
The ShaderContext is meant to contain the compiled version of a shader string.
A light originating from a single point in space, and shining in a particular direction,...
Computes texture coordinates for geometry automatically based on vertex position and/or normal.
Indicates the set of TextureStages and their associated Textures that should be applied to (or remove...
This is a special class object that holds all the information returned by a particular GSG to indicat...
Defines the properties of a named stage of the multitexture pipeline.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
This is a special class object that holds all the information returned by a particular GSG to indicat...
This is our own Panda specialization on the default STL deque.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.