You.i Engine
IYIShaderProgram Class Referenceabstract

Detailed Description

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>

Inheritance diagram for IYIShaderProgram:

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
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  Status {
- Protected Attributes inherited from IYIGPUObject
Status m_status

Constructor & Destructor Documentation

◆ ~IYIShaderProgram()

virtual IYIShaderProgram::~IYIShaderProgram ( )

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();

Member Function Documentation

◆ GetProgramInfoLog()

virtual CYIString IYIShaderProgram::GetProgramInfoLog ( ) const
pure virtual

Returns the shader program information log. This log is useful for diagnosing problems during the link phase of shader creation, if applicable.

See also

◆ GetShaderInfoLog()

virtual CYIString IYIShaderProgram::GetShaderInfoLog ( ) const
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.

See also

The documentation for this class was generated from the following file: