OpenGL::CgContext Class Reference

#include <CgContext.h>

List of all members.

Public Member Functions

CGcontext getContext () const
bool good () const
void enableProfile (CGprofile profile) const
void disableProfile (CGprofile profile) const
bool hasError () const
std::string getError () const
CGprofile getFragmentShader () const
CGprofile getVertexShader () const
std::string getCgProgramPath () const
GLenum getTexRectTarget () const
GLint getTexRectInternalFormat () const
GLenum getTex2dTarget () const
GLint getTex2dInternalFormat () const

Static Public Member Functions

static CgContextgetInstance ()


Detailed Description

The CgContext class is responsible for initializing a valid Cg context, and determines which fragment and vertex profiles are supported. The class also contains which texture targets and internal formats to use.


Member Function Documentation

void OpenGL::CgContext::disableProfile CGprofile  profile  )  const
 

Disables the given Cg profile.

Parameters:
profile the Cg profile to disable.

void OpenGL::CgContext::enableProfile CGprofile  profile  )  const
 

Enables the given Cg profile. This profile is then used by Cg programs executed afterwards.

Parameters:
profile the Cg profile to enable.

std::string OpenGL::CgContext::getCgProgramPath  )  const
 

Returns the path where the Cg program files are stored.

Returns:
the Cg program path.

CGcontext OpenGL::CgContext::getContext  )  const
 

Returns the valid Cg context.

Returns:
the valid Cg context.

std::string OpenGL::CgContext::getError  )  const
 

Returns a textual description of the latest error. Returns an empty string if no error has occured.

Returns:
a textual description of the latest error.

CGprofile OpenGL::CgContext::getFragmentShader  )  const
 

Returns the Cg profile used for fragment shaders (Cg programs).

Returns:
the fragment shader Cg profile.

CgContext & OpenGL::CgContext::getInstance  )  [static]
 

Returns the single CgContext instance. An instance is initialized if not already existing.

Returns:
the single CgContext instance.

GLint OpenGL::CgContext::getTex2dInternalFormat  )  const
 

Returns the internal format used for sampler2D textures. The internal format specifies the number of channels and the type and precision of each channel.

Returns:
the texture 2D internal format.

GLenum OpenGL::CgContext::getTex2dTarget  )  const
 

Returns the texture target used for sampler2D textures. The texture target defines how the texture image is specified and accessed via a set of texture coordinates.

Returns:
the texture 2D target.

GLint OpenGL::CgContext::getTexRectInternalFormat  )  const
 

Returns the internal format used for samplerRECT textures. The internal format specifies the number of channels and the type and precision of each channel.

Returns:
the texture rectangle internal format.

GLenum OpenGL::CgContext::getTexRectTarget  )  const
 

Returns the texture target used for samplerRECT textures. The texture target defines how the texture image is specified and accessed via a set of texture coordinates.

Returns:
the texture rectangle target.

CGprofile OpenGL::CgContext::getVertexShader  )  const
 

Returns the Cg profile used for vertex shaders (Cg programs).

Returns:
the vertex shader Cg profile.

bool OpenGL::CgContext::good  )  const
 

Returns whether the Cg context was successfully initialized.

Returns:
whether the Cg context was successfully initialized.

bool OpenGL::CgContext::hasError  )  const
 

Returns whether the CgContext has an error.

Returns:
whether the CgContext has an error.


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 08:42:52 2006 for GPU Thesis by  doxygen 1.4.6-NO