|
G3D::VertexAndPixelShader::GPUShader Class Reference#include <Shader.h>
List of all members.
Constructor & Destructor Documentation
| G3D::VertexAndPixelShader::GPUShader::~GPUShader |
( |
|
) |
|
Deletes the underlying glShaderObject.
Between GL's reference counting and G3D's reference counting, an underlying object can never be deleted while in use.
Member Function Documentation
| void G3D::VertexAndPixelShader::GPUShader::compile |
( |
|
) |
[protected] |
Returns true on success.
Called from init.
| bool G3D::VertexAndPixelShader::GPUShader::fixedFunction |
( |
|
) |
const [inline] |
| GLhandleARB G3D::VertexAndPixelShader::GPUShader::glShaderObject |
( |
|
) |
const [inline] |
Returns the underlying OpenGL shader object for this shader.
| GLenum G3D::VertexAndPixelShader::GPUShader::glShaderType |
( |
|
) |
const [inline] |
Shader type, e.g.
GL_VERTEX_SHADER_ARB
| void G3D::VertexAndPixelShader::GPUShader::init |
( |
const std::string & |
name, |
|
|
const std::string & |
code, |
|
|
bool |
fromFile, |
|
|
bool |
debug, |
|
|
GLenum |
glType, |
|
|
const std::string & |
type, |
|
|
UseG3DUniforms |
u | |
|
) |
| | |
| static GPUShader* G3D::VertexAndPixelShader::GPUShader::init |
( |
GPUShader * |
shader, |
|
|
bool |
debug | |
|
) |
| | [static, protected] |
Initialize a shader object and returns object.
Called from subclass create methods.
| const std::string& G3D::VertexAndPixelShader::GPUShader::messages |
( |
|
) |
const [inline] |
Why compilation failed, or any compiler warnings if it succeeded.
| bool G3D::VertexAndPixelShader::GPUShader::ok |
( |
|
) |
const [inline] |
Returns true if compilation and loading succeeded.
If they failed, check the message string.
| void G3D::VertexAndPixelShader::GPUShader::replaceG3DSize |
( |
std::string & |
code, |
|
|
std::string & |
uniformString | |
|
) |
| | [protected] |
Replaces all instances of "g3d_sampler2DSize(name)" with " (g3d_sz2D_name.xy)" and.
"g3d_sampler2DInvSize(name)" with " (g3d_sz2D_name.zw)"
Note that both replacements will leave column numbers the same in error messages. The () wrapper ensures that .xy fields are accessible using normal syntax off the result; it is the same as the standard practice of wrapping macros in parentheses.
and adds "uniform vec4 g3d_sz2D_name;" to the uniform string.
Called from init.
| const std::string& G3D::VertexAndPixelShader::GPUShader::shaderType |
( |
|
) |
const [inline] |
Member Data Documentation
Set to true when name and code both == "".
argument for output on subclasses
The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:48 2007 for G3D by
1.5.2
Hosted by
| |