qxLib
Public Member Functions | List of all members
qx::shader_base< ShaderType > Class Template Reference

OpenGL base shader. More...

#include <shaders.h>

Public Member Functions

string Init (const GLchar *pszShaderCode)
 Init (compile) shader. More...
 
GLuint GetID () const
 Get shader name. More...
 
GLint GetParameter (GLenum eParameter) const
 Get shader parameter. More...
 

Detailed Description

template<GLenum ShaderType>
class qx::shader_base< ShaderType >

OpenGL base shader.

~

Template Parameters
ShaderType- GL_VERTEX_SHADER, GL_TESS_CONTROL_SHADER, GL_TESS_EVALUATION_SHADER, GL_GEOMETRY_SHADER, GL_FRAGMENT_SHADER, GL_COMPUTE_SHADER
Author
Khrapov
Date
17.06.2019

Definition at line 42 of file shaders.h.

Member Function Documentation

◆ GetID()

template<GLenum ShaderType>
GLuint qx::shader_base< ShaderType >::GetID
inline

Get shader name.

Return values
-shader name

Definition at line 54 of file shaders.inl.

◆ GetParameter()

template<GLenum ShaderType>
GLint qx::shader_base< ShaderType >::GetParameter ( GLenum  eParameter) const
inline

Get shader parameter.

Parameters
eParameter- shader parameter
See also
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgram.xhtml
Return values
-shader parameter value

Definition at line 60 of file shaders.inl.

◆ Init()

template<GLenum ShaderType>
string qx::shader_base< ShaderType >::Init ( const GLchar *  pszShaderCode)
inline

Init (compile) shader.

Parameters
pszShaderCode- string with shader code
Return values
-error or empty string if init was successful

Definition at line 20 of file shaders.inl.


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