This class provides a common interface for creating and interacting with shader programs.
The ShaderProgram interface provides a thin wrapper on top of the graphics library functions related to shading.
Shader programs are made up of individual shaders, such as vertex or fragment shaders, that are compiled into a single executable unit describing a custom graphics pipeline. When a shader program is ready for execution on the GPU, the renderer will "use" it prior to rendering geometry in order to make the geometry proceed through this custom shader pipeline.
Individual shaders can be attached to multiple shader programs, but there is currently no support for attaching multiple shaders of the same type to a single shader program.
#include <renderer/YiShaderProgram.h>

Public Member Functions | |
| virtual | ~IYIShaderProgram () |
| virtual CYIString | GetShaderInfoLog () const =0 |
| virtual CYIString | GetProgramInfoLog () const =0 |
Public Member Functions inherited from IYIGPUObject | |
| IYIGPUObject () | |
| virtual | ~IYIGPUObject () |
| virtual void | Load (const std::shared_ptr< CYIAssetHardware > &pHWAsset)=0 |
| virtual void | Unload ()=0 |
| YI_GPU_OBJECT_STATUS | GetStatus () const |
| virtual void | Use () const =0 |
| virtual void | Generate ()=0 |
| virtual void | Free ()=0 |
| virtual void | InvalidateHandle ()=0 |
Additional Inherited Members | |
Public Types inherited from IYIGPUObject | |
| enum | YI_GPU_OBJECT_STATUS { INVALID, UNLOADED, LOADED_FRESH, LOADED_STALE } |
Protected Attributes inherited from IYIGPUObject | |
| YI_GPU_OBJECT_STATUS | m_status |
|
inlinevirtual |
Deletion of a shader program does not imply deletion of the attached shaders, this is because shaders can be shared across programs. However, the program itself will be deleted with a call to Free();
|
pure virtual |
Returns the shader program information log. This log is useful for diagnosing problems during the link phase of shader creation, if applicable.
|
pure virtual |
Returns the concatenated information logs for all shaders attached to this program. This log is useful for diagnosing problems during the compile phase of shader creation, if applicable.