CPPGPGPU Library - Reference (Doxygen)

Main Page | General Use | Reference | Examples Info | Get/Download CPPGPGPU | SF.net Page

OGLParts.cpp File Reference

#include "OGLParts.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <string>

Go to the source code of this file.

Namespaces

namespace  std

Functions

int OpenPPM (const char *sPPMName, unsigned char **buffer, int *width, int *height)
void DestroyShaderProgram (GLhandleARB iProgramID)
int FileReadLine (FILE *f, char *line, int iBufferSize)
void DrawSquare ()
 Draw a single square from [-1,-1] to [1,1].
void DrawGeometry (VertexData **vd, string *vsVertexNames, int iNumVertexDatas, IndexData *id, Shader *sShader)
 Draw the Index Data id using the specified vertex data and shader using GL_POINTS.
void DrawGeometrySolid (VertexData **vd, string *vsVertexNames, int iNumVertexDatas, IndexData *id, Shader *sShader, int facecount)
 Draw the Index Data id using the specified vertex data and shader using GL_TRIANGLES.
void SetupForDataRun ()
 Setup matricies for computation.
void PopFromDataRun ()
 Special command, for reversing effect of SetupForDataRun.
void StripDataFromBuffer (int ix, int iy, int iwidth, int iheight, TextureType tt, char *buffer)
 Strip data from the render/frame buffer into a vertex buffer object.

Variables

GLuint imTypes [6] = { GL_LUMINANCE8, GL_RGB, GL_RGBA, GL_RGBA16F_ARB, GL_RGBA32F_ARB, 0 }
GLuint imXTypes [6] = { GL_LUMINANCE, GL_RGB, GL_RGBA, GL_RGBA, GL_RGBA, 0 }
GLuint byTypes [6] = { GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_FLOAT, GL_FLOAT, 0 }


Function Documentation

void DestroyShaderProgram ( GLhandleARB  iProgramID  ) 

Definition at line 15 of file OGLParts.cpp.

void DrawGeometry ( VertexData **  vd,
string vsVertexNames,
int  iNumVertexDatas,
IndexData id,
Shader sShader 
)

Draw the Index Data id using the specified vertex data and shader using GL_POINTS.

Definition at line 771 of file OGLParts.cpp.

void DrawGeometrySolid ( VertexData **  vd,
string vsVertexNames,
int  iNumVertexDatas,
IndexData id,
Shader sShader,
int  facecount 
)

Draw the Index Data id using the specified vertex data and shader using GL_TRIANGLES.

Definition at line 792 of file OGLParts.cpp.

void DrawSquare (  ) 

Draw a single square from [-1,-1] to [1,1].

Definition at line 756 of file OGLParts.cpp.

int FileReadLine ( FILE *  f,
char *  line,
int  iBufferSize 
)

Definition at line 669 of file OGLParts.cpp.

int OpenPPM ( const char *  sPPMName,
unsigned char **  buffer,
int *  width,
int *  height 
)

Definition at line 699 of file OGLParts.cpp.

void PopFromDataRun (  ) 

Special command, for reversing effect of SetupForDataRun.

Definition at line 824 of file OGLParts.cpp.

void SetupForDataRun (  ) 

Setup matricies for computation.

Special command, for setting up the perspective and modelview matricies strictly for computation purpose. This command and the PopFromDataRun() command should be placed around any geometry you will be drawing for computation purposes.

Definition at line 813 of file OGLParts.cpp.

void StripDataFromBuffer ( int  ix,
int  iy,
int  iwidth,
int  iheight,
TextureType  tt,
char *  buffer 
)

Strip data from the render/frame buffer into a vertex buffer object.

Definition at line 832 of file OGLParts.cpp.


Variable Documentation

GLuint byTypes[6] = { GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE, GL_FLOAT, GL_FLOAT, 0 }

Definition at line 11 of file OGLParts.cpp.

GLuint imTypes[6] = { GL_LUMINANCE8, GL_RGB, GL_RGBA, GL_RGBA16F_ARB, GL_RGBA32F_ARB, 0 }

Definition at line 7 of file OGLParts.cpp.

GLuint imXTypes[6] = { GL_LUMINANCE, GL_RGB, GL_RGBA, GL_RGBA, GL_RGBA, 0 }

Definition at line 10 of file OGLParts.cpp.


© 2005-2007 Charles Lohr, Joshua Allen, David Chapman, Andrew Lohr. All material including documentation under the MIT/X11 license.