Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

OpenGLShader Class Reference

manages enumeration and initialization of OpenGL programmable shaders. More...

#include <OpenGLShader.h>

List of all members.


Public Methods

OpenGLShader (OpenGLExtensions *ext)
virtual ~OpenGLShader (void)
int LoadShader (const char *shaderpath)
Load a named set of shader source files (no filename extensions). More...

int reset (void)
int CompileShaders (GLubyte *vertexShader, GLubyte *fragmentshader)
Compile and link loaded shader source files. More...

void PrintInfoLog (GLhandleARB ProgramObject, const char *msg)
Print compilation log. More...

int ReadShaderSource (const char *filename, GLubyte **vs, GLubyte **fs)
Read shader source code from files into a byte array. More...

void UseShader (int onoff)
Make a valid compiled shader the active shader This replaces the fixed-function OpenGL pipeline and any other active shader. More...


Public Attributes

const OpenGLExtensions * ext
cached OpenGL extensions handle. More...

int isvalid
succesfully compiled shader flag. More...

GLhandleARB ProgramObject
ARB program object handle. More...

GLhandleARB VertexShaderObject
ARB vertex shader object handle. More...

GLhandleARB FragmentShaderObject
ARB fragment shader object handle. More...

int lastshader
last shader index/state used. More...


Detailed Description

manages enumeration and initialization of OpenGL programmable shaders.

Definition at line 31 of file OpenGLShader.h.


Constructor & Destructor Documentation

OpenGLShader::OpenGLShader ( OpenGLExtensions * ext )

virtual OpenGLShader::~OpenGLShader ( void ) [virtual]


Member Function Documentation

int OpenGLShader::CompileShaders ( GLubyte * vertexShader,
GLubyte * fragmentshader
)

Compile and link loaded shader source files.

int OpenGLShader::LoadShader ( const char * shaderpath )

Load a named set of shader source files (no filename extensions).

void OpenGLShader::PrintInfoLog ( GLhandleARB ProgramObject,
const char * msg
)

Print compilation log.

int OpenGLShader::ReadShaderSource ( const char * filename,
GLubyte ** vs,
GLubyte ** fs
)

Read shader source code from files into a byte array.

int OpenGLShader::reset ( void )

void OpenGLShader::UseShader ( int onoff )

Make a valid compiled shader the active shader This replaces the fixed-function OpenGL pipeline and any other active shader.


Member Data Documentation

const OpenGLExtensions* OpenGLShader::ext

cached OpenGL extensions handle.

Definition at line 33 of file OpenGLShader.h.

GLhandleARB OpenGLShader::FragmentShaderObject

ARB fragment shader object handle.

Definition at line 37 of file OpenGLShader.h.

int OpenGLShader::isvalid

succesfully compiled shader flag.

Definition at line 34 of file OpenGLShader.h.

int OpenGLShader::lastshader

last shader index/state used.

Definition at line 38 of file OpenGLShader.h.

GLhandleARB OpenGLShader::ProgramObject

ARB program object handle.

Definition at line 35 of file OpenGLShader.h.

Referenced by OpenGLRenderer::update_shader_uniforms.

GLhandleARB OpenGLShader::VertexShaderObject

ARB vertex shader object handle.

Definition at line 36 of file OpenGLShader.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 17 02:48:51 2025 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002

AltStyle によって変換されたページ (->オリジナル) /