#include <gls_index_array.h>
The GlsIndexArray class. Wraps an OpenGL index buffer object. 
◆ GlsIndexArray()
◆ ~GlsIndexArray()
◆ AllocateBuffer()
  
  | 
        
          | void AllocateBuffer | ( | const unsigned int | size | ) |  |  | protected | 
 
Allocates the buffer data, copying the existing data 
- Parameters
- 
  
    | size | The new size in bytes to allocate |  
 
 
 
◆ Bake()
Download the index buffer data to Open GL 
- Precondition
- (_vboHandle != 0) && (_size > 0) 
- Parameters
- 
  
    | stateManager | The OpenGL state to download the index buffer to |  
 
 
 
◆ Bind()
Bind the index buffer, e.g. make it current 
- Precondition
- (_vboHandle != 0) && (_size > 0) 
- Parameters
- 
  
    | stateManager | The OpenGL state to bind the buffer on |  
 
 
 
◆ DeallocateBuffer()
  
  | 
        
          | void DeallocateBuffer | ( |  | ) |  |  | protected | 
 
Deallocates the buffer data 
 
 
◆ GetSize()
  
  | 
        
          | unsigned int GetSize | ( |  | ) | const |  | inline | 
 
- Returns
- Returns the size of the index buffer 
 
 
◆ SetIndex()
      
        
          | void SetIndex | ( | const unsigned int | index, | 
        
          |  |  | const unsigned short | value | 
        
          |  | ) |  |  | 
      
 
Sets one index 
- Precondition
- index < _size 
- Parameters
- 
  
    | index | The index of the index to set |  | value | The index data |  
 
 
 
◆ SetIndices()
      
        
          | void SetIndices | ( | const unsigned short | indexData[] | ) |  | 
      
 
Populates the the index buffer 
- Precondition
- _size > 0 
- Parameters
- 
  
    | indexData | The indices to set. The array length is assumed to be equal to GetSize() |  
 
 
 
◆ SetSize()
      
        
          | void SetSize | ( | const unsigned int | size | ) |  | 
      
 
Sets the size of the index buffer 
- Parameters
- 
  
    | size | New index buffer count |  
 
 
 
◆ _indexData
  
  | 
        
          | unsigned short* _indexData |  | protected | 
 
The memory for storing the indices 
 
 
◆ _size
The number of indices. There can be unsigned int quantity of unsigned short values 
 
 
◆ _vboHandle
The documentation for this class was generated from the following file: