Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

gl_util.H File Reference

Contains several OpenGL related utility functions. More...

#include <cassert>
#include "std/support.H"
#include "glew/glew.H"
#include "disp/color.H"
#include "mlib/points.H"

Include dependency graph for gl_util.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  float4
 Representation of an array of 4 floats. Convenient for passing COLOR + alpha, Wpt, or Wvec to OpenGL:. More...
class  float3
 Representation of an array of 3 floats. Convenient for passing a Wpt, Wvec, or COLOR to OpenGL. More...
class  float2
 Representation of an array of 2 floats. Convenient for passing a PIXEL or other 2D type to OpenGL. More...
class  float16
 Representation of an array of 16 floats. Really only seems applicable for Wtransf, thus that is the only variety provided. More...

Functions

GLenum light_i (int i)
 Convenience function. E.g.: light_i(0) returns GL_LIGHT0.
void GL_COL (CCOLOR &c, double a)
 Send a color and alpha value to OpenGL.
void GL_MAT_COLOR (GLenum face, GLenum pname, const COLOR &c, double a)
 Set OpenGL material color values given a COLOR and an alpha value.


Detailed Description

Contains several OpenGL related utility functions.

Definition in file gl_util.H.


Function Documentation

void GL_COL CCOLOR c,
double  a
[inline]
 

Send a color and alpha value to OpenGL.

Definition at line 229 of file gl_util.H.

References glColor4fv().

Referenced by ZcrossTexture::draw(), XToonTexture::draw(), WireframeTexture::draw(), ToonTexture_1D::draw(), SolidColorTexture::draw(), SmoothShadeTexture::draw(), SilsTexture::draw(), VertUVTexture::draw(), VertNormalsTexture::draw(), LineDrawingTexture::draw(), DEBUG_ELLIPSE::draw(), GEOM::draw(), FlatShadeTexture::draw(), CurvatureTexture::draw(), CreasesTexture::draw(), SHOW_TRIS::draw_filled(), ControlFrameTexture::draw_level(), SHOW_TRIS::draw_lines(), ControlFrameTexture::draw_selected_edges(), ControlFrameTexture::draw_selected_faces(), LINE3D::draw_start(), GLSLToonShader::draw_start(), GtexUtil::draw_strip(), VertColorStripCB::faceCB(), SmoothShadeStripCB::faceCB(), LineDrawingGLSLMode::StripCB::faceCB(), LineDrawingVprogFprogNoSSDMode::StripCB::faceCB(), StripTexCoordsCB2::faceCB(), FlatShadeStripCB::faceCB(), StripTexCoordsCB3::faceCB(), CurvatureARBvpARBfpMultiTextureMode::StripCB::faceCB(), MSLDShader::set_gl_state(), HalftoneShaderEx::set_gl_state(), HalftoneShader::set_gl_state(), GLSLShader::set_gl_state(), GLSLHatching::set_gl_state(), DotsShader_EX::set_gl_state(), and DotsShader::set_gl_state().

void GL_MAT_COLOR GLenum  face,
GLenum  pname,
const COLOR c,
double  a
[inline]
 

Set OpenGL material color values given a COLOR and an alpha value.

Definition at line 236 of file gl_util.H.

References GL_AMBIENT, GL_AMBIENT_AND_DIFFUSE, GL_BACK, GL_DIFFUSE, GL_EMISSION, GL_FRONT, GL_FRONT_AND_BACK, GL_SPECULAR, and glMaterialfv().

Referenced by SmoothShadeTexture::draw().

GLenum light_i int  i  )  [inline]
 

Convenience function. E.g.: light_i(0) returns GL_LIGHT0.

Definition at line 211 of file gl_util.H.

References GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, and GL_LIGHT7.

Referenced by GL_VIEW::setup_light().


Generated on Mon Sep 18 11:41:00 2006 for jot by  doxygen 1.4.4