Otclient  14/8/2020
HardwareBuffer Class Reference

#include <hardwarebuffer.h>

Public Types

enum  Type { VertexBuffer = GL_ARRAY_BUFFER, IndexBuffer = GL_ELEMENT_ARRAY_BUFFER }
 
enum  UsagePattern { StreamDraw = GL_STREAM_DRAW, StaticDraw = GL_STATIC_DRAW, DynamicDraw = GL_DYNAMIC_DRAW }
 

Public Member Functions

 HardwareBuffer (Type type)
 
 ~HardwareBuffer ()
 
void bind ()
 
void write (void *data, int count, UsagePattern usage)
 

Static Public Member Functions

static void unbind (Type type)
 

Detailed Description

Definition at line 29 of file hardwarebuffer.h.

Member Enumeration Documentation

◆ Type

Enumerator
VertexBuffer 
IndexBuffer 

Definition at line 32 of file hardwarebuffer.h.

◆ UsagePattern

Enumerator
StreamDraw 
StaticDraw 
DynamicDraw 

Definition at line 37 of file hardwarebuffer.h.

Constructor & Destructor Documentation

◆ HardwareBuffer()

HardwareBuffer::HardwareBuffer ( Type  type)

Definition at line 29 of file hardwarebuffer.cpp.

Here is the call graph for this function:

◆ ~HardwareBuffer()

HardwareBuffer::~HardwareBuffer ( )

Definition at line 38 of file hardwarebuffer.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ bind()

void HardwareBuffer::bind ( )
inline

Definition at line 46 of file hardwarebuffer.h.

Here is the caller graph for this function:

◆ unbind()

static void HardwareBuffer::unbind ( Type  type)
inlinestatic

Definition at line 47 of file hardwarebuffer.h.

Here is the caller graph for this function:

◆ write()

void HardwareBuffer::write ( void *  data,
int  count,
UsagePattern  usage 
)
inline

Definition at line 48 of file hardwarebuffer.h.

Here is the caller graph for this function:

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