| 
    Berserk
    
   | 
 
GL Shader (compiled and linked) native program. More...
#include <GLShader.hpp>


Public Member Functions | |
| BRK_API | GLShader (const RHIShaderDesc &desc) | 
| BRK_API | ~GLShader () override | 
| BRK_API Status | GetCompilationStatus () const override | 
| BRK_API String | GetCompilerMessage () const override | 
| BRK_API Ref< const RHIShaderMeta > | GetShaderMeta () const override | 
| BRK_API void | Initialize () | 
| BRK_API bool | ValidateStages () const | 
| BRK_API void | InitializeMeta () | 
| BRK_API void | BindUniformBlock (uint32 binding) const | 
| BRK_API void | Use () const | 
| GLuint | GetHandle () const | 
  Public Member Functions inherited from RHIShader | |
| BRK_API | ~RHIShader () override=default | 
| const StringName & | GetShaderName () const | 
| RHIShaderLanguage | GetLanguage () const | 
| const std::vector< RHIShaderStageDesc > & | GetStages () const | 
  Public Member Functions inherited from RHIResource | |
| BRK_API | ~RHIResource () override=default | 
  Public Member Functions inherited from RefCnt | |
| virtual | ~RefCnt () | 
| bool | IsUnique () const | 
| std::int32_t | GetRefs () const | 
| std::int32_t | AddRef () const | 
| std::int32_t | RelRef () const | 
Additional Inherited Members | |
  Public Types inherited from RHIShader | |
| enum class | Status : uint32 { PendingCompilation = 0 , Compiled = 1 , FailedCompile = 2 } | 
| Program may have different status (incorrect shaders mush not crash the application)  More... | |
  Protected Member Functions inherited from RHIResource | |
| void | Destroy () const override | 
  Protected Attributes inherited from RHIShader | |
| StringName | mName | 
| RHIShaderLanguage | mLanguage | 
| std::vector< RHIShaderStageDesc > | mStages | 
GL Shader (compiled and linked) native program.
      
  | 
  explicit | 
      
  | 
  override | 
| void GLShader::BindUniformBlock | ( | uint32 | binding | ) | const | 
      
  | 
  overridevirtual | 
Check program status: whether the program was compiled and all stages linked by RHI.
Implements RHIShader.
      
  | 
  overridevirtual | 
Get compiler message about this program compilation. If compilation finished with an error returns error description, otherwise nothing.
Implements RHIShader.
      
  | 
  inline | 
      
  | 
  overridevirtual | 
Get compiled program meta information for params & buffers communication.
PendingCompilation or FailedCompile is not valid function call. Implements RHIShader.
| void GLShader::Initialize | ( | ) | 
| void GLShader::InitializeMeta | ( | ) | 
Meta name is the same as program has
| void GLShader::Use | ( | ) | const | 
| bool GLShader::ValidateStages | ( | ) | const |