14#ifndef DXSHADERCONTEXT9_H
15#define DXSHADERCONTEXT9_H
17#include "dtool_config.h"
65 INLINE
bool valid(GSG *gsg);
69 void issue_transform(GSG *gsg);
77 LPDIRECT3DVERTEXDECLARATION9 _vertex_declaration;
79 int _num_bound_streams;
86 CGprogram _cg_program;
87 pvector <CGparameter> _cg_parameter_map;
91 void release_resources(
void);
97 static void init_type() {
100 TypedObject::get_class_type());
103 return get_class_type();
105 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
A GraphicsStateGuardian for rendering into DirectX9 contexts.
DXShaderContext9(Shader *s, GSG *gsg)
xyz
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 ...
bool valid(GSG *gsg)
Returns true if the shader is "valid", ie, if the compilation was successful.
void disable_shader_vertex_arrays(GSG *gsg)
Disable all the vertex arrays used by this shader.
void unbind(GSG *gsg)
This function disables a currently-bound shader.
void disable_shader_texture_bindings(GSG *gsg)
Disable all the texture bindings used by this shader.
bool bind(GSG *gsg)
This function is to be called to enable a new shader.
void update_shader_texture_bindings(DXShaderContext9 *prev, GSG *gsg)
Disables all texture bindings used by the previous shader, then enables all the texture bindings need...
void issue_parameters(GSG *gsg, int altered)
This function gets called whenever the RenderState or TransformState has changed, but the Shader itse...
TypeHandle is the identifier used to differentiate C++ class types.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
This class gives the ability for a user-friendly way of creating a vertex declaration for DirectX 9.
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.