PS2GL
OpenGL*-like API for the PS2
Loading...
Searching...
No Matches
CGeometryBlock Class Reference

Public Member Functions

void SetVerticesAreValid (bool valid)
 
void SetNormalsAreValid (bool valid)
 
void SetTexCoordsAreValid (bool valid)
 
void SetColorsAreValid (bool valid)
 
bool GetVerticesAreValid () const
 
bool GetNormalsAreValid () const
 
bool GetTexCoordsAreValid () const
 
bool GetColorsAreValid () const
 
int GetWordsPerVertex () const
 
int GetWordsPerNormal () const
 
int GetWordsPerTexCoord () const
 
int GetWordsPerColor () const
 
void SetWordsPerVertex (char num)
 
void SetWordsPerNormal (char num)
 
void SetWordsPerTexCoord (char num)
 
void SetWordsPerColor (char num)
 
void SetArrayType (ArrayType::tArrayType type)
 
ArrayType::tArrayType GetNewArrayType () const
 
ArrayType::tArrayType GetArrayType () const
 
void SetNumIndices (unsigned int num)
 
void SetIndices (const void *indices)
 
void SetIStripLengths (const void *strips)
 
const void * GetVertices (int strip=0)
 
const void * GetNormals (int strip=0)
 
const void * GetTexCoords (int strip=0)
 
const void * GetColors (int strip=0)
 
const void * GetIndices (int array)
 
const void * GetIStripLengths (int array)
 
void SetVertices (const void *verts)
 
void SetNormals (const void *norms)
 
void SetTexCoords (const void *texcoords)
 
void SetColors (const void *colors)
 
GLenum GetPrimType () const
 
void SetPrimType (GLenum type)
 
int GetNumNewVertices () const
 
int GetNumNewNormals () const
 
int GetNumNewTexCoords () const
 
int GetNumNewColors () const
 
int GetTotalVertices () const
 
void AddVertices (int num=1)
 
void AddNormals (int num=1)
 
void AddTexCoords (int num=1)
 
void AddColors (int num=1)
 
void SetNumVertsPerPrim (int num)
 
int GetNumVertsPerPrim ()
 
void SetNumVertsToRestartStrip (int num)
 
void SetStripsCanBeMerged (bool merge)
 
int GetNumStrips () const
 
int GetNumVertsToRestartStrip ()
 
bool GetStripsCanBeMerged () const
 
int GetStripLength (int num) const
 
bool StripIsContinued (int num) const
 
int GetNumArrays () const
 
int GetArrayLength (int array) const
 
int GetNumIndices (int array) const
 
void ResetCurStrip ()
 
void ResetNew ()
 
void Reset ()
 
bool IsPending () const
 
bool MergeNew ()
 
void MakeNewValuesCurrent ()
 
void AdjustNewGeomPtrs (int offset)
 

Private Member Functions

void CommitPrimType ()
 
bool SameDataFormat ()
 
bool MergeNewLinear ()
 
bool MergeNewIndexed ()
 

Private Attributes

int TotalVertices
 
char WordsPerVertex
 
char WordsPerNormal
 
char WordsPerTexCoord
 
char WordsPerColor
 
char NumVertsToRestartStrip
 
char NumVertsPerPrim
 
bool StripsCanBeMerged
 
bool AreVerticesValid
 
bool AreNormalsValid
 
bool AreTexCoordsValid
 
bool AreColorsValid
 
GLenum PrimType
 
ArrayType::tArrayType ArrayType
 
unsigned char NumStrips
 
unsigned int StripLengths [kMaxNumStrips]
 
const void * IStripLengths [kMaxNumStrips]
 
const void * Indices [kMaxNumStrips]
 
const void * Vertices [kMaxNumStrips]
 
const void * Normals [kMaxNumStrips]
 
const void * TexCoords [kMaxNumStrips]
 
const void * Colors [kMaxNumStrips]
 
unsigned char NumIndices [kMaxNumStrips]
 
GLenum NewPrimType
 
ArrayType::tArrayType NewArrayType
 
const void * NewVertices
 
const void * NewNormals
 
const void * NewTexCoords
 
const void * NewColors
 
const void * NewIndices
 
const void * NewIStripLengths
 
int NumNewVertices
 
int NumNewNormals
 
int NumNewTexCoords
 
int NumNewColors
 
int NumNewIndices
 
char WordsPerNewVertex
 
char WordsPerNewNormal
 
char WordsPerNewTexCoord
 
char WordsPerNewColor
 
bool AreNewVerticesValid
 
bool AreNewNormalsValid
 
bool AreNewTexCoordsValid
 
bool AreNewColorsValid
 

Static Private Attributes

static const int kMaxNumStrips = 40
 
static const unsigned int kContinueFlag = 0x80000000
 

Detailed Description

Definition at line 29 of file gblock.h.

Constructor & Destructor Documentation

◆ CGeometryBlock()

CGeometryBlock::CGeometryBlock ( )
inline

Definition at line 72 of file gblock.h.

Member Function Documentation

◆ CommitPrimType()

void CGeometryBlock::CommitPrimType ( )
private

Definition at line 214 of file gblock.cpp.

◆ SameDataFormat()

bool CGeometryBlock::SameDataFormat ( )
private

Definition at line 16 of file gblock.cpp.

◆ MergeNewLinear()

bool CGeometryBlock::MergeNewLinear ( )
private

Definition at line 80 of file gblock.cpp.

◆ MergeNewIndexed()

bool CGeometryBlock::MergeNewIndexed ( )
private

Definition at line 52 of file gblock.cpp.

◆ SetVerticesAreValid()

void CGeometryBlock::SetVerticesAreValid ( bool  valid)
inline

Definition at line 76 of file gblock.h.

◆ SetNormalsAreValid()

void CGeometryBlock::SetNormalsAreValid ( bool  valid)
inline

Definition at line 77 of file gblock.h.

◆ SetTexCoordsAreValid()

void CGeometryBlock::SetTexCoordsAreValid ( bool  valid)
inline

Definition at line 78 of file gblock.h.

◆ SetColorsAreValid()

void CGeometryBlock::SetColorsAreValid ( bool  valid)
inline

Definition at line 79 of file gblock.h.

◆ GetVerticesAreValid()

bool CGeometryBlock::GetVerticesAreValid ( ) const
inline

Definition at line 81 of file gblock.h.

◆ GetNormalsAreValid()

bool CGeometryBlock::GetNormalsAreValid ( ) const
inline

Definition at line 82 of file gblock.h.

◆ GetTexCoordsAreValid()

bool CGeometryBlock::GetTexCoordsAreValid ( ) const
inline

Definition at line 83 of file gblock.h.

◆ GetColorsAreValid()

bool CGeometryBlock::GetColorsAreValid ( ) const
inline

Definition at line 84 of file gblock.h.

◆ GetWordsPerVertex()

int CGeometryBlock::GetWordsPerVertex ( ) const
inline

Definition at line 86 of file gblock.h.

◆ GetWordsPerNormal()

int CGeometryBlock::GetWordsPerNormal ( ) const
inline

Definition at line 87 of file gblock.h.

◆ GetWordsPerTexCoord()

int CGeometryBlock::GetWordsPerTexCoord ( ) const
inline

Definition at line 88 of file gblock.h.

◆ GetWordsPerColor()

int CGeometryBlock::GetWordsPerColor ( ) const
inline

Definition at line 89 of file gblock.h.

◆ SetWordsPerVertex()

void CGeometryBlock::SetWordsPerVertex ( char  num)
inline

Definition at line 91 of file gblock.h.

◆ SetWordsPerNormal()

void CGeometryBlock::SetWordsPerNormal ( char  num)
inline

Definition at line 92 of file gblock.h.

◆ SetWordsPerTexCoord()

void CGeometryBlock::SetWordsPerTexCoord ( char  num)
inline

Definition at line 93 of file gblock.h.

◆ SetWordsPerColor()

void CGeometryBlock::SetWordsPerColor ( char  num)
inline

Definition at line 94 of file gblock.h.

◆ SetArrayType()

void CGeometryBlock::SetArrayType ( ArrayType::tArrayType  type)
inline

Definition at line 96 of file gblock.h.

◆ GetNewArrayType()

ArrayType::tArrayType CGeometryBlock::GetNewArrayType ( ) const
inline

Definition at line 97 of file gblock.h.

◆ GetArrayType()

ArrayType::tArrayType CGeometryBlock::GetArrayType ( ) const
inline

Definition at line 98 of file gblock.h.

◆ SetNumIndices()

void CGeometryBlock::SetNumIndices ( unsigned int  num)
inline

Definition at line 100 of file gblock.h.

◆ SetIndices()

void CGeometryBlock::SetIndices ( const void *  indices)
inline

Definition at line 101 of file gblock.h.

◆ SetIStripLengths()

void CGeometryBlock::SetIStripLengths ( const void *  strips)
inline

Definition at line 102 of file gblock.h.

◆ GetVertices()

const void * CGeometryBlock::GetVertices ( int  strip = 0)
inline

Definition at line 104 of file gblock.h.

◆ GetNormals()

const void * CGeometryBlock::GetNormals ( int  strip = 0)
inline

Definition at line 109 of file gblock.h.

◆ GetTexCoords()

const void * CGeometryBlock::GetTexCoords ( int  strip = 0)
inline

Definition at line 114 of file gblock.h.

◆ GetColors()

const void * CGeometryBlock::GetColors ( int  strip = 0)
inline

Definition at line 119 of file gblock.h.

◆ GetIndices()

const void * CGeometryBlock::GetIndices ( int  array)
inline

Definition at line 124 of file gblock.h.

◆ GetIStripLengths()

const void * CGeometryBlock::GetIStripLengths ( int  array)
inline

Definition at line 129 of file gblock.h.

◆ SetVertices()

void CGeometryBlock::SetVertices ( const void *  verts)
inline

Definition at line 135 of file gblock.h.

◆ SetNormals()

void CGeometryBlock::SetNormals ( const void *  norms)
inline

Definition at line 136 of file gblock.h.

◆ SetTexCoords()

void CGeometryBlock::SetTexCoords ( const void *  texcoords)
inline

Definition at line 137 of file gblock.h.

◆ SetColors()

void CGeometryBlock::SetColors ( const void *  colors)
inline

Definition at line 138 of file gblock.h.

◆ GetPrimType()

GLenum CGeometryBlock::GetPrimType ( ) const
inline

Definition at line 140 of file gblock.h.

◆ SetPrimType()

void CGeometryBlock::SetPrimType ( GLenum  type)
inline

Definition at line 141 of file gblock.h.

◆ GetNumNewVertices()

int CGeometryBlock::GetNumNewVertices ( ) const
inline

Definition at line 143 of file gblock.h.

◆ GetNumNewNormals()

int CGeometryBlock::GetNumNewNormals ( ) const
inline

Definition at line 144 of file gblock.h.

◆ GetNumNewTexCoords()

int CGeometryBlock::GetNumNewTexCoords ( ) const
inline

Definition at line 145 of file gblock.h.

◆ GetNumNewColors()

int CGeometryBlock::GetNumNewColors ( ) const
inline

Definition at line 146 of file gblock.h.

◆ GetTotalVertices()

int CGeometryBlock::GetTotalVertices ( ) const
inline

Definition at line 148 of file gblock.h.

◆ AddVertices()

void CGeometryBlock::AddVertices ( int  num = 1)
inline

Definition at line 152 of file gblock.h.

◆ AddNormals()

void CGeometryBlock::AddNormals ( int  num = 1)
inline

Definition at line 153 of file gblock.h.

◆ AddTexCoords()

void CGeometryBlock::AddTexCoords ( int  num = 1)
inline

Definition at line 154 of file gblock.h.

◆ AddColors()

void CGeometryBlock::AddColors ( int  num = 1)
inline

Definition at line 155 of file gblock.h.

◆ SetNumVertsPerPrim()

void CGeometryBlock::SetNumVertsPerPrim ( int  num)
inline

Definition at line 160 of file gblock.h.

◆ GetNumVertsPerPrim()

int CGeometryBlock::GetNumVertsPerPrim ( )
inline

Definition at line 161 of file gblock.h.

◆ SetNumVertsToRestartStrip()

void CGeometryBlock::SetNumVertsToRestartStrip ( int  num)
inline

Definition at line 166 of file gblock.h.

◆ SetStripsCanBeMerged()

void CGeometryBlock::SetStripsCanBeMerged ( bool  merge)
inline

Definition at line 167 of file gblock.h.

◆ GetNumStrips()

int CGeometryBlock::GetNumStrips ( ) const
inline

Definition at line 169 of file gblock.h.

◆ GetNumVertsToRestartStrip()

int CGeometryBlock::GetNumVertsToRestartStrip ( )
inline

can the strips in this block be merged into the same render buffer and be rendered with a single giftag/prim setting? (triangle fans can't)

Definition at line 173 of file gblock.h.

◆ GetStripsCanBeMerged()

bool CGeometryBlock::GetStripsCanBeMerged ( ) const
inline

Definition at line 174 of file gblock.h.

◆ GetStripLength()

int CGeometryBlock::GetStripLength ( int  num) const
inline

Definition at line 175 of file gblock.h.

◆ StripIsContinued()

bool CGeometryBlock::StripIsContinued ( int  num) const
inline

Definition at line 180 of file gblock.h.

◆ GetNumArrays()

int CGeometryBlock::GetNumArrays ( ) const
inline

Definition at line 188 of file gblock.h.

◆ GetArrayLength()

int CGeometryBlock::GetArrayLength ( int  array) const
inline

Definition at line 189 of file gblock.h.

◆ GetNumIndices()

int CGeometryBlock::GetNumIndices ( int  array) const
inline

Definition at line 193 of file gblock.h.

◆ ResetCurStrip()

void CGeometryBlock::ResetCurStrip ( )

Definition at line 192 of file gblock.cpp.

◆ ResetNew()

void CGeometryBlock::ResetNew ( )

Definition at line 179 of file gblock.cpp.

◆ Reset()

void CGeometryBlock::Reset ( )

Definition at line 202 of file gblock.cpp.

◆ IsPending()

bool CGeometryBlock::IsPending ( ) const
inline

Definition at line 207 of file gblock.h.

◆ MergeNew()

bool CGeometryBlock::MergeNew ( )

Definition at line 37 of file gblock.cpp.

◆ MakeNewValuesCurrent()

void CGeometryBlock::MakeNewValuesCurrent ( )

Definition at line 148 of file gblock.cpp.

◆ AdjustNewGeomPtrs()

void CGeometryBlock::AdjustNewGeomPtrs ( int  offset)
inline

Definition at line 210 of file gblock.h.

Field Documentation

◆ TotalVertices

int CGeometryBlock::TotalVertices
private

Definition at line 31 of file gblock.h.

◆ WordsPerVertex

char CGeometryBlock::WordsPerVertex
private

Definition at line 32 of file gblock.h.

◆ WordsPerNormal

char CGeometryBlock::WordsPerNormal
private

Definition at line 32 of file gblock.h.

◆ WordsPerTexCoord

char CGeometryBlock::WordsPerTexCoord
private

Definition at line 32 of file gblock.h.

◆ WordsPerColor

char CGeometryBlock::WordsPerColor
private

Definition at line 32 of file gblock.h.

◆ NumVertsToRestartStrip

char CGeometryBlock::NumVertsToRestartStrip
private

Definition at line 33 of file gblock.h.

◆ NumVertsPerPrim

char CGeometryBlock::NumVertsPerPrim
private

Definition at line 33 of file gblock.h.

◆ StripsCanBeMerged

bool CGeometryBlock::StripsCanBeMerged
private

Definition at line 34 of file gblock.h.

◆ AreVerticesValid

bool CGeometryBlock::AreVerticesValid
private

Definition at line 35 of file gblock.h.

◆ AreNormalsValid

bool CGeometryBlock::AreNormalsValid
private

Definition at line 35 of file gblock.h.

◆ AreTexCoordsValid

bool CGeometryBlock::AreTexCoordsValid
private

Definition at line 35 of file gblock.h.

◆ AreColorsValid

bool CGeometryBlock::AreColorsValid
private

Definition at line 35 of file gblock.h.

◆ PrimType

GLenum CGeometryBlock::PrimType
private

Definition at line 37 of file gblock.h.

◆ ArrayType

ArrayType::tArrayType CGeometryBlock::ArrayType
private

Definition at line 38 of file gblock.h.

◆ kMaxNumStrips

const int CGeometryBlock::kMaxNumStrips = 40
staticprivate

Definition at line 40 of file gblock.h.

◆ kContinueFlag

const unsigned int CGeometryBlock::kContinueFlag = 0x80000000
staticprivate

Definition at line 41 of file gblock.h.

◆ NumStrips

unsigned char CGeometryBlock::NumStrips
private

Definition at line 42 of file gblock.h.

◆ StripLengths

unsigned int CGeometryBlock::StripLengths[kMaxNumStrips]
private

Definition at line 43 of file gblock.h.

◆ IStripLengths

const void* CGeometryBlock::IStripLengths[kMaxNumStrips]
private

Definition at line 44 of file gblock.h.

◆ Indices

const void* CGeometryBlock::Indices[kMaxNumStrips]
private

Definition at line 45 of file gblock.h.

◆ Vertices

const void* CGeometryBlock::Vertices[kMaxNumStrips]
private

Definition at line 46 of file gblock.h.

◆ Normals

const void* CGeometryBlock::Normals[kMaxNumStrips]
private

Definition at line 47 of file gblock.h.

◆ TexCoords

const void* CGeometryBlock::TexCoords[kMaxNumStrips]
private

Definition at line 48 of file gblock.h.

◆ Colors

const void* CGeometryBlock::Colors[kMaxNumStrips]
private

Definition at line 49 of file gblock.h.

◆ NumIndices

unsigned char CGeometryBlock::NumIndices[kMaxNumStrips]
private

Definition at line 50 of file gblock.h.

◆ NewPrimType

GLenum CGeometryBlock::NewPrimType
private

Definition at line 54 of file gblock.h.

◆ NewArrayType

ArrayType::tArrayType CGeometryBlock::NewArrayType
private

Definition at line 55 of file gblock.h.

◆ NewVertices

const void* CGeometryBlock::NewVertices
private

Definition at line 57 of file gblock.h.

◆ NewNormals

const void * CGeometryBlock::NewNormals
private

Definition at line 57 of file gblock.h.

◆ NewTexCoords

const void * CGeometryBlock::NewTexCoords
private

Definition at line 57 of file gblock.h.

◆ NewColors

const void * CGeometryBlock::NewColors
private

Definition at line 57 of file gblock.h.

◆ NewIndices

const void* CGeometryBlock::NewIndices
private

Definition at line 58 of file gblock.h.

◆ NewIStripLengths

const void * CGeometryBlock::NewIStripLengths
private

Definition at line 58 of file gblock.h.

◆ NumNewVertices

int CGeometryBlock::NumNewVertices
private

Definition at line 59 of file gblock.h.

◆ NumNewNormals

int CGeometryBlock::NumNewNormals
private

Definition at line 59 of file gblock.h.

◆ NumNewTexCoords

int CGeometryBlock::NumNewTexCoords
private

Definition at line 59 of file gblock.h.

◆ NumNewColors

int CGeometryBlock::NumNewColors
private

Definition at line 59 of file gblock.h.

◆ NumNewIndices

int CGeometryBlock::NumNewIndices
private

Definition at line 59 of file gblock.h.

◆ WordsPerNewVertex

char CGeometryBlock::WordsPerNewVertex
private

Definition at line 60 of file gblock.h.

◆ WordsPerNewNormal

char CGeometryBlock::WordsPerNewNormal
private

Definition at line 60 of file gblock.h.

◆ WordsPerNewTexCoord

char CGeometryBlock::WordsPerNewTexCoord
private

Definition at line 61 of file gblock.h.

◆ WordsPerNewColor

char CGeometryBlock::WordsPerNewColor
private

Definition at line 61 of file gblock.h.

◆ AreNewVerticesValid

bool CGeometryBlock::AreNewVerticesValid
private

Definition at line 62 of file gblock.h.

◆ AreNewNormalsValid

bool CGeometryBlock::AreNewNormalsValid
private

Definition at line 62 of file gblock.h.

◆ AreNewTexCoordsValid

bool CGeometryBlock::AreNewTexCoordsValid
private

Definition at line 63 of file gblock.h.

◆ AreNewColorsValid

bool CGeometryBlock::AreNewColorsValid
private

Definition at line 63 of file gblock.h.


The documentation for this class was generated from the following files: