Files Class List

Detailed Description

General OpenGL queries.

This class includes static functions for general OpenGL queries and types used by the other classes in this file.

#include <cyGL.h>

Public Types

enum  Type {
  TYPE_UBYTE = 0, TYPE_USHORT, TYPE_HALF, TYPE_FLOAT,
  TYPE_INT8, TYPE_UINT8, TYPE_INT16, TYPE_UINT16,
  TYPE_INT32, TYPE_UINT32
}
 

Static Public Member Functions

static GLenum GetGLType (const GLubyte *)
 
static GLenum GetGLType (const GLushort *)
 
static GLenum GetGLType (const GLfloat *)
 
static GLenum GetGLType (const GLbyte *)
 
static GLenum GetGLType (const GLshort *)
 
static GLenum GetGLType (const GLint *)
 
static GLenum GetGLType (const GLuint *)
 
static Type GetType (const GLubyte *)
 
static Type GetType (const GLushort *)
 
static Type GetType (const GLfloat *)
 
static Type GetType (const GLbyte *)
 
static Type GetType (const GLshort *)
 
static Type GetType (const GLint *)
 
static Type GetType (const GLuint *)
 
static GLenum TextureFormat (Type type, int numChannels)
 
static GLenum TextureDataFormat (Type type, int numChannels)
 
static void PrintVersion (std::ostream *outStream=&std::cout)
 
static void CheckError (const char *sourcefile, int line, const char *call=nullptr, std::ostream *outStream=&std::cout)
 
static bool CheckContext ()
 

Member Enumeration Documentation

§ Type

enum Type

OpenGL types.

Member Function Documentation

§ GetGLType() [1/7]

static GLenum GetGLType ( const GLubyte *  )
static

Returns the OpenGL type identifier that corresponds to unsigned byte.

§ GetGLType() [2/7]

static GLenum GetGLType ( const GLushort *  )
static

Returns the OpenGL type identifier that corresponds to unsigned short.

§ GetGLType() [3/7]

static GLenum GetGLType ( const GLfloat *  )
static

Returns the OpenGL type identifier that corresponds to float.

§ GetGLType() [4/7]

static GLenum GetGLType ( const GLbyte *  )
static

Returns the OpenGL type identifier that corresponds to byte.

§ GetGLType() [5/7]

static GLenum GetGLType ( const GLshort *  )
static

Returns the OpenGL type identifier that corresponds to short.

§ GetGLType() [6/7]

static GLenum GetGLType ( const GLint *  )
static

Returns the OpenGL type identifier that corresponds to int.

§ GetGLType() [7/7]

static GLenum GetGLType ( const GLuint *  )
static

Returns the OpenGL type identifier that corresponds to unsigned int.

§ GetType() [1/7]

static Type GetType ( const GLubyte *  )
static

Returns the Type that corresponds to unsigned byte.

§ GetType() [2/7]

static Type GetType ( const GLushort *  )
static

Returns the Type that corresponds to unsigned short.

§ GetType() [3/7]

static Type GetType ( const GLfloat *  )
static

Returns the Type that corresponds to float.

§ GetType() [4/7]

static Type GetType ( const GLbyte *  )
static

Returns the Type that corresponds to byte.

§ GetType() [5/7]

static Type GetType ( const GLshort *  )
static

Returns the Type that corresponds to short.

§ GetType() [6/7]

static Type GetType ( const GLint *  )
static

Returns the Type that corresponds to int.

§ GetType() [7/7]

static Type GetType ( const GLuint *  )
static

Returns the Type that corresponds to unsigned int.

§ TextureFormat()

GLenum TextureFormat ( GL::Type  type,
int  numChannels 
)
static

Returns the internal OpenGL texture type identifier for the given Type and the number of channels.

§ TextureDataFormat()

GLenum TextureDataFormat ( GL::Type  type,
int  numChannels 
)
static

Returns the OpenGL texture data format identifier for the given Type and the number of channels.

§ PrintVersion()

void PrintVersion ( std::ostream *  outStream = &std::cout)
static

Prints the OpenGL version to the given stream.

§ CheckError()

void CheckError ( const char *  sourcefile,
int  line,
const char *  call = nullptr,
std::ostream *  outStream = &std::cout 
)
static

Checks all previously triggered OpenGL errors and prints them to the given output stream.

§ CheckContext()

static bool CheckContext ( )
static

Checks if an OpenGL context exists. Returns false if a valid OpenGL context cannot be retrieved. This is mostly useful for safely deleting previously allocated OpenGL objects.