|
| ShaderProgram_OGL (Graphics *graphics, ShaderVariation *vertexShader, ShaderVariation *pixelShader) |
| Construct.
|
|
| ~ShaderProgram_OGL () override |
| Destruct.
|
|
void | OnDeviceLost () override |
| Mark the GPU resource destroyed on context destruction. More...
|
|
void | Release () override |
| Release shader program. More...
|
|
bool | Link () |
| Link the shaders and examine the uniforms and samplers used. Return true if successful.
|
|
ShaderVariation * | GetVertexShader () const |
| Return the vertex shader.
|
|
ShaderVariation * | GetPixelShader () const |
| Return the pixel shader.
|
|
bool | HasParameter (StringHash param) const |
| Return whether uses a shader parameter.
|
|
bool | HasTextureUnit (TextureUnit unit) const |
| Return whether uses a texture unit.
|
|
const ShaderParameter * | GetParameter (StringHash param) const |
| Return the info for a shader parameter, or null if does not exist.
|
|
const String & | GetLinkerOutput () const |
| Return linker output.
|
|
const HashMap< Pair< i8, i8 >, unsigned > & | GetVertexAttributes () const |
| Return semantic to vertex attributes location mappings used by the shader.
|
|
unsigned | GetUsedVertexAttributes () const |
| Return attribute location use bitmask.
|
|
const SharedPtr< ConstantBuffer > * | GetConstantBuffers () const |
| Return all constant buffers.
|
|
bool | NeedParameterUpdate (ShaderParameterGroup group, const void *source) |
| Check whether a shader parameter group needs update. Does not actually check whether parameters exist in the shaders.
|
|
void | ClearParameterSource (ShaderParameterGroup group) |
| Clear a parameter source. Affects only the current shader program if appropriate.
|
|
| RefCounted () |
| Construct. Allocate the reference count structure and set an initial self weak reference.
|
|
virtual | ~RefCounted () |
| Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
|
|
| RefCounted (const RefCounted &rhs)=delete |
| Prevent copy construction.
|
|
RefCounted & | operator= (const RefCounted &rhs)=delete |
| Prevent assignment.
|
|
void | AddRef () |
| Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting.
|
|
void | ReleaseRef () |
| Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting.
|
|
int | Refs () const |
| Return reference count.
|
|
int | WeakRefs () const |
| Return weak reference count.
|
|
RefCount * | RefCountPtr () |
| Return pointer to the reference count structure.
|
|
| GPUObject (Graphics *graphics) |
| Construct with graphics subsystem pointer.
|
|
virtual | ~GPUObject () |
| Destruct. Remove from the Graphics.
|
|
virtual void | OnDeviceLost () |
| Mark the GPU resource destroyed on graphics context destruction. More...
|
|
virtual void | OnDeviceReset () |
| Recreate the GPU resource and restore data if applicable. More...
|
|
virtual void | Release () |
| Unconditionally release the GPU resource. More...
|
|
void | ClearDataLost () |
| Clear the data lost flag.
|
|
Graphics * | GetGraphics () const |
| Return the graphics subsystem associated with this GPU object.
|
|
void * | GetGPUObject () const |
| Return the object pointer. Applicable only on Direct3D.
|
|
u32 | GetGPUObjectName () const |
| Return the object name. Applicable only on OpenGL.
|
|
bool | IsDataLost () const |
| Return whether data is lost due to context loss.
|
|
bool | HasPendingData () const |
| Return whether has pending data assigned while graphics context was lost.
|
|
|
WeakPtr< ShaderVariation > | vertexShader_ |
| Vertex shader.
|
|
WeakPtr< ShaderVariation > | pixelShader_ |
| Pixel shader.
|
|
HashMap< StringHash, ShaderParameter > | shaderParameters_ |
| Shader parameters.
|
|
bool | useTextureUnits_ [MAX_TEXTURE_UNITS] {} |
| Texture unit use.
|
|
HashMap< Pair< i8, i8 >, unsigned > | vertexAttributes_ |
| Vertex attributes.
|
|
unsigned | usedVertexAttributes_ {} |
| Used vertex attribute location bitmask.
|
|
SharedPtr< ConstantBuffer > | constantBuffers_ [MAX_SHADER_PARAMETER_GROUPS *2] |
| Constant buffers by binding index.
|
|
const void * | parameterSources_ [MAX_SHADER_PARAMETER_GROUPS] {} |
| Remembered shader parameter sources for individual uniform mode.
|
|
String | linkerOutput_ |
| Shader link error string.
|
|
i32 | frameNumber_ {} |
| Shader parameter source framenumber.
|
|
Linked shader program on the GPU.