#include <PureVertexTransferModeImpl.h>
◆ ~PureVertexTransferImpl()
PureVertexTransfer::PureVertexTransferImpl::~PureVertexTransferImpl |
( |
| ) |
|
|
virtual |
◆ PureVertexTransferImpl() [1/2]
- Parameters
-
pOwner | The public Mesh3D class instance owning this pimpl mesh. |
matMgr | A MaterialManager instance to be used for knowing texture unit / layers count. |
vmod | What vertex modifying habit to be set for the new Mesh3D instance. |
vref | What vertex referencing mode to be set for the new Mesh3D instance. |
bForceUseClientMemory | Force-select a vertex transfer mode storing geometry in client memory instead of server memory. Please note that this is considered only if dynamic modifying habit is specified. Specifying static modifying habit will always select a mode which places geometry data into server memory. |
Definition at line 333 of file PureVertexTransferMode.cpp.
◆ PureVertexTransferImpl() [2/2]
◆ compileIntoDisplayList()
TPureBool PureVertexTransfer::PureVertexTransferImpl::compileIntoDisplayList |
( |
TPureBool | indexed | ) |
|
|
private |
Compiles OpenGL drawing commands into display list.
- Parameters
-
indexed | If true, will issue ProcessGeometry() to go thru geometry data by using indices for order. |
- Returns
- True on success, false otherwise.
Definition at line 581 of file PureVertexTransferMode.cpp.
◆ compileIntoVertexBufferObjects()
Compiles geometry into VBOs.
- Parameters
-
indexed | If true, will go thru geometry data by using indices for order. This will generate an element array buffer. Ignored if vertex indices array is NULL. |
dynamic | If true, the usage hint when building vertex buffer objects will be dynamic, otherwise static. |
- Returns
- True on success, false otherwise.
Definition at line 626 of file PureVertexTransferMode.cpp.
◆ FreeGLresources()
void PureVertexTransfer::PureVertexTransferImpl::FreeGLresources |
( |
| ) |
|
|
private |
Frees up allocated resources from OpenGL.
Should be called before setting a new Vertex Transfer mode and when deleting the mesh.
Definition at line 733 of file PureVertexTransferMode.cpp.
◆ getGLprimitiveFromPureprimitive()
GLenum PureVertexTransfer::PureVertexTransferImpl::getGLprimitiveFromPureprimitive |
( |
TPURE_PRIMITIVE_FORMAT | pf | ) |
|
|
static |
◆ getLastTransferredTriangleCount()
TPureUInt PureVertexTransfer::PureVertexTransferImpl::getLastTransferredTriangleCount |
( |
| ) |
const |
◆ getLastTransferredVertexCount()
TPureUInt PureVertexTransfer::PureVertexTransferImpl::getLastTransferredVertexCount |
( |
| ) |
const |
◆ getPureprimitiveFromGLprimitive()
TPURE_PRIMITIVE_FORMAT PureVertexTransfer::PureVertexTransferImpl::getPureprimitiveFromGLprimitive |
( |
GLenum | glprim | ) |
|
|
static |
◆ getUsedSystemMemory()
TPureUInt PureVertexTransfer::PureVertexTransferImpl::getUsedSystemMemory |
( |
| ) |
const |
◆ getVertexModifyingHabit()
◆ getVertexReferencingMode()
◆ getVertexTransferMode()
◆ isSwitchFromIndexedAllowed()
TPureBool PureVertexTransfer::PureVertexTransferImpl::isSwitchFromIndexedAllowed |
( |
| ) |
const |
|
private |
Tells whether it is allowed to switch from indexed to non-indexed vertex transfer mode.
Tells whether it is allowed to switch from indexed to non-indexed vertex referencing mode.
It is allowed when geometry data is stored redundantly so direct referencing is available. Geometry data is stored redundantly when multiple vertices are defined with the same position for different faces. In this situation, the number of vertex indices is equal to the number of defined vertices so the number of defined vertices is the adequate number for rendering the whole geometry even without using indices. So switching to non-indexed is disallowed only when the number of defined vertices is less than the number of indices.
- Returns
- True if swithing from indexed to non-indexed vertex referencing mode is allowed, false otherwise.
Definition at line 488 of file PureVertexTransferMode.cpp.
◆ operator=()
◆ ProcessGeometry()
void PureVertexTransfer::PureVertexTransferImpl::ProcessGeometry |
( |
TPureBool | indexed | ) |
const |
|
private |
Goes thru vertices and feeds them to OpenGL.
Used by any vertex transfer mode not utilizing vertex arrays, such as:
- immediate mode;
- display lists. Handles both direct and indexed vertex reference modes. Since level-1 meshes don't have geometry, this function is invoked for level-2 meshes.
- Parameters
-
indexed | If true, will go thru vertices by using pVertexIndices for ordering, otherwise won't use it. |
Definition at line 517 of file PureVertexTransferMode.cpp.
◆ ResetArrayPointers()
void PureVertexTransfer::PureVertexTransferImpl::ResetArrayPointers |
( |
TPureBool | redirectToServer = false | ) |
const |
|
private |
Resets pointers after drawing.
Resets vertex data pointers after drawing.
Can be used for both vertex buffer objects and legacy vertex arrays.
- Parameters
-
redirectToServer | Specify true if geometry data is located in server memory. |
Definition at line 861 of file PureVertexTransferMode.cpp.
◆ ResetLastTransferredCounts()
void PureVertexTransfer::PureVertexTransferImpl::ResetLastTransferredCounts |
( |
| ) |
|
|
protected |
◆ SetArrayPointers()
void PureVertexTransfer::PureVertexTransferImpl::SetArrayPointers |
( |
TPureBool | redirectToServer = false | ) |
const |
|
private |
Sets vertex data pointers prior to drawing.
Can be used for both vertex buffer objects and legacy vertex arrays.
- Parameters
-
redirectToServer | Specify true if geometry data is located in server memory. |
Definition at line 785 of file PureVertexTransferMode.cpp.
◆ setVertexTransferMode()
◆ transferVertices()
TPureUInt PureVertexTransfer::PureVertexTransferImpl::transferVertices |
( |
| ) |
|
|
protected |
◆ PureObject3D
◆ PureVertexTransfer
◆ _pOwner
◆ bParentInitiatedOperation
TPureBool PureVertexTransfer::PureVertexTransferImpl::bParentInitiatedOperation |
|
private |
◆ materialMgr
◆ nColorsVBO
GLuint PureVertexTransfer::PureVertexTransferImpl::nColorsVBO |
|
private |
◆ nDispList
GLuint PureVertexTransfer::PureVertexTransferImpl::nDispList |
|
private |
◆ nIndicesVBO
GLuint PureVertexTransfer::PureVertexTransferImpl::nIndicesVBO |
|
private |
◆ nLastTransferredTriangles
TPureUInt PureVertexTransfer::PureVertexTransferImpl::nLastTransferredTriangles |
|
private |
◆ nLastTransferredVertices
TPureUInt PureVertexTransfer::PureVertexTransferImpl::nLastTransferredVertices |
|
private |
◆ nNormalsVBO
GLuint PureVertexTransfer::PureVertexTransferImpl::nNormalsVBO |
|
private |
◆ nTexcoordsVBO
std::vector<GLuint> PureVertexTransfer::PureVertexTransferImpl::nTexcoordsVBO |
|
private |
◆ nVerticesVBO
GLuint PureVertexTransfer::PureVertexTransferImpl::nVerticesVBO |
|
private |
◆ vertexTransferMode
The documentation for this class was generated from the following files: