arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

glUtil.h File Reference

#include <GL/glew.h>
#include <iostream>

Go to the source code of this file.

Compounds

struct  LimitsGL
 GL Limits. More...

struct  WinStatsGL
 GL Window state. More...


Functions

bool glErr (std::ostream &os, const char *where=0, const char *when=0)
 General GL/WGL error reporting.

void wglGetLastError (std::ostream &os, const char *where=0)
WinStatsGL getGLWinStats (bool print=false)
const LimitsGL getLimitsGL ()
void setColorMask (GLenum channel)
 GL Color & Texture Utils.

GLenum validateSingleRGBChannel (GLenum channel)
bool isSingleChannel (GLenum channel)
 Return true if 'channel' is single-channel GLenum.

int getNumChannels (GLenum format)
 Return true if 'channel' is single-channel GLenum.

int getTexDim (GLenum texType)
 Get the number of color channels represented by 'format'.


Function Documentation

WinStatsGL getGLWinStats bool  print = false  ) 
 

Definition at line 126 of file glUtil.cpp.

References WinStatsGL::accumBits, WinStatsGL::auxBuffer, WinStatsGL::colorBits, WinStatsGL::depthBits, WinStatsGL::doubleBuffer, GL_ACCUM_ALPHA_BITS, GL_ACCUM_BLUE_BITS, GL_ACCUM_GREEN_BITS, GL_ACCUM_RED_BITS, GL_ALPHA_BITS, GL_AUX_BUFFERS, GL_BLUE_BITS, GL_DEPTH_BITS, GL_DOUBLEBUFFER, GL_GREEN_BITS, GL_RED_BITS, GL_STENCIL_BITS, GL_STEREO, glGetBooleanv(), glGetIntegerv(), WinStatsGL::stencilBits, and WinStatsGL::stereoBuffer.

const LimitsGL getLimitsGL  ) 
 

Definition at line 173 of file glUtil.cpp.

References GL_MAX_TEXTURE_UNITS_ARB, glGetIntegerv(), LimitsGL::maxTexCoords, and LimitsGL::maxTexUnits.

int getNumChannels GLenum  format  ) 
 

Return true if 'channel' is single-channel GLenum.

Definition at line 241 of file glUtil.cpp.

References format, GL_ALPHA, GL_BLUE, GL_COLOR_INDEX, GL_DEPTH_COMPONENT, GL_GREEN, GL_LUMINANCE, GL_RED, GL_RGB, GL_RGBA, and GL_STENCIL_INDEX.

Referenced by glift::CoreTex::getDataf(), and glift::CoreTex::getDataub().

int getTexDim GLenum  texType  ) 
 

Get the number of color channels represented by 'format'.

Definition at line 266 of file glUtil.cpp.

References GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, and GL_TEXTURE_CUBE_MAP_ARB.

bool glErr std::ostream &  os,
const char *  where = 0,
const char *  when = 0
 

General GL/WGL error reporting.

Definition at line 51 of file glUtil.cpp.

References glGetError(), and GLuint.

Referenced by glift::CoreTex::bindDef(), glift::Shader::bindDef(), glift::MultiTex::bindDef(), glift::EmptyTex::bindDef(), glift::DispList::compile(), glift::CoreTex::CoreTex(), PBuffer::disable(), VolRenBase::drawDef(), GLItem::drawGL(), PBuffer::enable(), loadTexture1D(), loadTexture2D(), loadTexture3D(), main(), BasicQGL::readFrameBuffer(), glift::MultiTex::releaseDef(), glift::EmptyTex::releaseDef(), glift::RenderableGLI::render(), glift::RenderPass::renderDef(), reshape(), and BasicQGL::writeFrameBuffer().

bool isSingleChannel GLenum  channel  ) 
 

Return true if 'channel' is single-channel GLenum.

Definition at line 222 of file glUtil.cpp.

References GL_ALPHA, GL_BLUE, GL_GREEN, GL_LUMINANCE, and GL_RED.

void setColorMask GLenum  channel  ) 
 

GL Color & Texture Utils.

Definition at line 191 of file glUtil.cpp.

References GL_ALPHA, GL_BLUE, GL_FALSE, GL_GREEN, GL_NONE, GL_RED, GL_RGB, GL_RGBA, GL_TRUE, and glColorMask().

Referenced by drawSingleTexQuad(), and drawSubPixels().

GLenum validateSingleRGBChannel GLenum  channel  ) 
 

Definition at line 208 of file glUtil.cpp.

References GL_BLUE, GL_GREEN, GL_RED, and GLenum.

void wglGetLastError std::ostream &  os,
const char *  where = 0
 


Send questions, comments, and bug reports to:
jmk