CPPGPGPU Library - Reference (Doxygen)

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

VertexData Class Reference

Vertex Buffer Object. More...

#include <OGLParts.h>

List of all members.

Public Member Functions

 VertexData ()
 ~VertexData ()
void Init (float *Verts, int iNumVerts, int iStride=3)
 Set Verts to be NULL if you will be streaming to this. Otherwise, put data in here.
void UpdateData (float *Verts, int iNumVerts, int iStride=3)
 Allows you to change the data enclosed within the buffer.
void StripFromFrameBuffer (int iWidth, int iHeight, TextureType tt)
 Note: This can only be stripped from 0th texture in the framebuffer.

Private Attributes

int mStride
GLuint iVertexData

Friends

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.


Detailed Description

Vertex Buffer Object.

This class is used to hold Vertex data. It can be ripped from the 0th slot on a RFBuffer when it's being used. Idealy, you would either load regular data into here when operating normally, or you would rip data off a framebuffer into this object. When loading data into this object, you would execute StripFromFrameBuffer() immediately before your framebuffer's End() command.

Definition at line 236 of file OGLParts.h.


Constructor & Destructor Documentation

VertexData::VertexData (  )  [inline]

Definition at line 239 of file OGLParts.h.

VertexData::~VertexData (  ) 

Definition at line 626 of file OGLParts.cpp.


Member Function Documentation

void VertexData::Init ( float *  Verts,
int  iNumVerts,
int  iStride = 3 
)

Set Verts to be NULL if you will be streaming to this. Otherwise, put data in here.

Definition at line 633 of file OGLParts.cpp.

void VertexData::UpdateData ( float *  Verts,
int  iNumVerts,
int  iStride = 3 
)

Allows you to change the data enclosed within the buffer.

Definition at line 644 of file OGLParts.cpp.

void VertexData::StripFromFrameBuffer ( int  iWidth,
int  iHeight,
TextureType  tt 
)

Note: This can only be stripped from 0th texture in the framebuffer.

Definition at line 652 of file OGLParts.cpp.


Friends And Related Function Documentation

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

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 
) [friend]

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

Definition at line 792 of file OGLParts.cpp.


Member Data Documentation

int VertexData::mStride [private]

Definition at line 251 of file OGLParts.h.

GLuint VertexData::iVertexData [private]

Definition at line 252 of file OGLParts.h.


The documentation for this class was generated from the following files:
© 2005-2007 Charles Lohr, Joshua Allen, David Chapman, Andrew Lohr. All material including documentation under the MIT/X11 license.