Panda3D
|
xyz More...
#include "dxShaderContext9.h"
Public Types | |
typedef DXGraphicsStateGuardian9 | GSG |
Public Member Functions | |
DXShaderContext9 (Shader *s, GSG *gsg) | |
xyz More... | |
~DXShaderContext9 () | |
xyz More... | |
bool | bind (GSG *gsg) |
This function is to be called to enable a new shader. More... | |
void | disable_shader_texture_bindings (GSG *gsg) |
Disable all the texture bindings used by this shader. More... | |
void | disable_shader_vertex_arrays (GSG *gsg) |
Disable all the vertex arrays used by this shader. More... | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
void | issue_parameters (GSG *gsg, int altered) |
This function gets called whenever the RenderState or TransformState has changed, but the Shader itself has not changed. More... | |
void | issue_transform (GSG *gsg) |
void | unbind (GSG *gsg) |
This function disables a currently-bound shader. More... | |
void | update_shader_texture_bindings (DXShaderContext9 *prev, GSG *gsg) |
Disables all texture bindings used by the previous shader, then enables all the texture bindings needed by this shader. More... | |
bool | update_shader_vertex_arrays (DXShaderContext9 *prev, GSG *gsg, bool force) |
Disables all vertex arrays used by the previous shader, then enables all the vertex arrays needed by this shader. More... | |
bool | valid (GSG *gsg) |
![]() | |
ShaderContext (Shader *se) | |
virtual void | bind (bool reissue_parameters=true) |
virtual void | disable_shader_texture_bindings () |
virtual void | disable_shader_vertex_arrays () |
Shader * | get_shader () const |
virtual void | issue_parameters (int altered) |
virtual void | unbind () |
virtual void | update_shader_texture_bindings (ShaderContext *prev) |
virtual bool | update_shader_vertex_arrays (ShaderContext *prev, bool force) |
virtual bool | uses_custom_texture_bindings (void) |
virtual bool | uses_custom_vertex_arrays (void) |
virtual bool | uses_standard_vertex_arrays (void) |
virtual bool | valid () |
![]() | |
virtual void | output (ostream &out) const |
virtual void | write (ostream &out, int indent_level) const |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
void | operator= (const TypedObject ©) |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. More... | |
Public Attributes | |
string | _name |
int | _num_bound_streams |
LPDIRECT3DVERTEXDECLARATION9 | _vertex_declaration |
class VertexElementArray * | _vertex_element_array |
![]() | |
Shader * | _shader |
xyz
Definition at line 63 of file dxShaderContext9.h.
xyz
Definition at line 40 of file dxShaderContext9.cxx.
DXShaderContext9::~DXShaderContext9 | ( | ) |
xyz
Definition at line 88 of file dxShaderContext9.cxx.
bool DXShaderContext9::bind | ( | GSG * | gsg | ) |
This function is to be called to enable a new shader.
It also initializes all of the shader's input parameters.
Definition at line 179 of file dxShaderContext9.cxx.
void DXShaderContext9::disable_shader_texture_bindings | ( | GSG * | gsg | ) |
Disable all the texture bindings used by this shader.
Definition at line 684 of file dxShaderContext9.cxx.
void DXShaderContext9::disable_shader_vertex_arrays | ( | GSG * | gsg | ) |
Disable all the vertex arrays used by this shader.
Definition at line 409 of file dxShaderContext9.cxx.
void DXShaderContext9::issue_parameters | ( | GSG * | gsg, |
int | altered | ||
) |
This function gets called whenever the RenderState or TransformState has changed, but the Shader itself has not changed.
It loads new values into the shader's parameters.
If "altered" is false, that means you promise that the parameters for this shader context have already been issued once, and that since the last time the parameters were issued, no part of the render state has changed except the external and internal transforms.
Definition at line 257 of file dxShaderContext9.cxx.
References GraphicsStateGuardian::fetch_ptr_parameter(), GraphicsStateGuardian::fetch_specified_value(), and LMatrix4f::get_data().
void DXShaderContext9::unbind | ( | GSG * | gsg | ) |
This function disables a currently-bound shader.
Definition at line 219 of file dxShaderContext9.cxx.
void DXShaderContext9::update_shader_texture_bindings | ( | DXShaderContext9 * | prev, |
GSG * | gsg | ||
) |
Disables all texture bindings used by the previous shader, then enables all the texture bindings needed by this shader.
Extracts the relevant vertex array data from the gsg. The current implementation is inefficient, because it may unnecessarily disable textures then immediately reenable them. We may optimize this someday.
Definition at line 722 of file dxShaderContext9.cxx.
References DXGraphicsStateGuardian9::apply_texture(), TextureAttrib::get_num_on_stages(), TextureAttrib::get_on_sampler(), TextureAttrib::get_on_stage(), TextureAttrib::get_on_texture(), TextureStage::get_tex_view_offset(), Texture::get_texture_type(), Texture::load_related(), and Texture::prepare_now().
bool DXShaderContext9::update_shader_vertex_arrays | ( | DXShaderContext9 * | prev, |
GSG * | gsg, | ||
bool | force | ||
) |
Disables all vertex arrays used by the previous shader, then enables all the vertex arrays needed by this shader.
Extracts the relevant vertex array data from the gsg. The current implementation is inefficient, because it may unnecessarily disable arrays then immediately reenable them. We may optimize this someday.
Definition at line 431 of file dxShaderContext9.cxx.
References TextureStage::get_texcoord_name(), and DXGraphicsStateGuardian9::setup_array_data().