Maria GDK 5.0.0.737
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::GridIndexBuffer Class Reference

#include <MGridIndexBuffer.h>

Public Member Functions

 GridIndexBuffer (int rows=0, int cols=0)
 
void resize (int rows, int cols)
 
bool bindBuffer ()
 Bind the OpenGL Buffer.
 
int getNumRows () const
 
int getNumCols () const
 
bool drawIndexedTriangles ()
 Draw indexed triangles. This method requires that a corresponding vertex buffer is enabled.
 
int getNumGridCellCols () const
 
int getNumGridCellRows () const
 
int getNumTriangleIndices () const
 

Detailed Description

GridIndexBuffer - OpenGL index buffer for gridded data. This index buffer can be shared between different gridded data objects.

This will create a grid of triangle indexes with two triangles per grid cell The number of rows and cols specifies the grid vertices (corners), so the number of grid cells is actually (rows - 1)*(cols - 1).

Member Function Documentation

◆ drawIndexedTriangles()

bool Maria::GridIndexBuffer::drawIndexedTriangles ( )

Draw indexed triangles. This method requires that a corresponding vertex buffer is enabled.

Returns
True on success, false on failure.

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