ClanLib  2.3.7
Friends | List of all members
CL_OpenGL Class Reference

OpenGL utility class. More...

#include <opengl.h>

Friends

class CL_OpenGLGraphicContextProvider
 

Attributes

static CL_GLFunctionsfunctions
 Function table for OpenGL 2.0. More...
 
static CL_ProcAddressget_proc_address (const CL_String8 &function_name)
 Get OpenGL extension specific function address. More...
 
static int get_textureformat_bits (CL_TextureFormat format)
 Returns the number of bits in a texture format. More...
 
static bool to_opengl_pixelformat (CL_TextureFormat texture_format, GLenum &format, GLenum &type)
 Get a OpenGL format out of a pixel format. More...
 
static void to_opengl_textureformat (CL_TextureFormat format, GLint &gl_internal_format, GLenum &gl_pixel_format)
 To opengl textureformat. More...
 
static void set_active (CL_GraphicContext &gc)
 Sets the thread's OpenGL context to the one used by the graphic context. More...
 
static void set_active (const CL_OpenGLGraphicContextProvider *const gc_provider)
 Sets the thread's OpenGL context to the one used by the graphic context. More...
 
static bool set_active ()
 Sets the thread's OpenGL context to the first valid allocated one. More...
 
static void check_error ()
 Throw an exception if an OpenGL error was detected ( Using glGetError() ) More...
 
static int get_opengl_version_major ()
 Get the opengl version major number. More...
 
static int get_opengl_version_minor ()
 Get the opengl version minor number. More...
 
static int get_glsl_version_major ()
 Get the glsl version major number. More...
 
static int get_glsl_version_minor ()
 Get the glsl version minor number. More...
 

Detailed Description

OpenGL utility class.

Member Function Documentation

static void CL_OpenGL::check_error ( )
static

Throw an exception if an OpenGL error was detected ( Using glGetError() )

Remember to call glGetError() to clear any previous errors

static int CL_OpenGL::get_glsl_version_major ( )
inlinestatic

Get the glsl version major number.

static int CL_OpenGL::get_glsl_version_minor ( )
inlinestatic

Get the glsl version minor number.

static int CL_OpenGL::get_opengl_version_major ( )
inlinestatic

Get the opengl version major number.

static int CL_OpenGL::get_opengl_version_minor ( )
inlinestatic

Get the opengl version minor number.

static CL_ProcAddress* CL_OpenGL::get_proc_address ( const CL_String8 function_name)
static

Get OpenGL extension specific function address.

static int CL_OpenGL::get_textureformat_bits ( CL_TextureFormat  format)
static

Returns the number of bits in a texture format.

static void CL_OpenGL::set_active ( CL_GraphicContext gc)
static

Sets the thread's OpenGL context to the one used by the graphic context.

static void CL_OpenGL::set_active ( const CL_OpenGLGraphicContextProvider *const  gc_provider)
static

Sets the thread's OpenGL context to the one used by the graphic context.

static bool CL_OpenGL::set_active ( )
static

Sets the thread's OpenGL context to the first valid allocated one.

If a valid OpenGL context is not found, then "no render context" is set.

Returns
true = Success. false = No OpenGL contexts could be found
static bool CL_OpenGL::to_opengl_pixelformat ( CL_TextureFormat  texture_format,
GLenum format,
GLenum type 
)
static

Get a OpenGL format out of a pixel format.

The function returns false if pixelformat color depth is not convertible to OpenGL pixel format, otherwise the format and type are returned with values in format and type.

static void CL_OpenGL::to_opengl_textureformat ( CL_TextureFormat  format,
GLint gl_internal_format,
GLenum gl_pixel_format 
)
static

To opengl textureformat.

Parameters
format= Texture Format
gl_internal_format= GLint
gl_pixel_format= GLenum

Friends And Related Function Documentation

friend class CL_OpenGLGraphicContextProvider
friend

Member Data Documentation

CL_GLFunctions* CL_OpenGL::functions
static

Function table for OpenGL 2.0.


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