Back to class index
VertexBuffer[Class Summary]
hasPosPreScaleMatrix
posScale
posAdd
usedVertexAttribStreamIndices
vertexBufferObject
vertexBufferObject2
gpuVertexBufferBytes2
vbToVsInputMappings
name
ctor
~dtor
ctor
operator=(rhs)
ctor
Deinit()
SetVertexDeclaration(decl)
ConvertToVertexDeclaration(decl)
Declaration()[const] (+1 overload)
SetNumVertices(...)
EraseVertices(index,numVertices)
NumVertices()[const]
CapacityBytes()[const]
AppendVertices(numVertices) (+1 overload)
NumPrimitives()[const]
SizeBytes()[const]
VertexSizeBytes()[const]
Set(...) (+2 overloads)
SetFloat4(...)
SetFloat3(...)
SetFloat2(...)
SetFloat(...)
Set(...)
Get(...)[const]
SwapVertices(i,j)
GetPointer(vertexIndex) (+1 overload)
CpuPtr() (+1 overload)
GetPointer(vertexIndex)[const] (+1 overload)
GetOffset(vertexIndex)[const] (+1 overload)
AllocateCpuMemory()
AllocateGpuMemory(...) (+1 overload)
UpdateToGpu()
HasCpuMemory()[const]
CpuSizeBytes()[const]
HasGpuMemory()[const]
GpuSizeBytes()[const]
FreeCpuMemory()
FreeGpuMemory()
BindToMaterial(material)
IsBindingCompatibleWith(material)[const]
IsBoundToMaterial()[const]
BoundingAABB()[const] (+1 overload)
BoundingSphere()[const]
ConvexHull()[const]
NumVerticesNeededToRenderNPrimitives(numPrimitives)[const]
SaveToFile(filename) (+1 overload)
LoadFromFile(...) (+1 overload)
Transform(matrix)
WeldVertices(...)
RemoveSmallTriangles(minArea)
PreScaleMatrix()[const]
Name()[const]

VertexBuffer::UpdateToGpu

Syntax

void VertexBuffer::UpdateToGpu();

Copies the CPU-side vertex buffer data to the GPU memory.

Call this function after having modified the CPU-side data.

Work in progress:

Todo: in void VertexBuffer::UpdateToGpu():
Should this be '>=' since if equal, we'll write the full data ?!
Todo: in void VertexBuffer::UpdateToGpu():
Differentiate between GL_STREAM_DRAW and GL_DYNAMIC_DRAW.

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index