You.i Engine
CYIGLAbstractBufferObject Class Reference

Detailed Description

An abstract class for common OpenGL buffer functionality.

#include <renderer/YiGLAbstractBufferObject.h>

Inheritance diagram for CYIGLAbstractBufferObject:

Public Member Functions

 CYIGLAbstractBufferObject (GLuint handle)
virtual ~CYIGLAbstractBufferObject ()
virtual void SetTarget (GLenum target)
virtual GLenum GetTarget ()
virtual GLuint GetHandle ()
- Public Member Functions inherited from CYIBufferObject
 CYIBufferObject ()
virtual ~CYIBufferObject ()
virtual void * Map ()
virtual void Unmap (size_t size)
- Public Member Functions inherited from IYIGPUObject
 IYIGPUObject ()
virtual ~IYIGPUObject ()
virtual void Load (const std::shared_ptr< CYIAssetHardware > &pHWAsset)=0
virtual void Unload ()=0
Status GetStatus () const
virtual void Use () const =0
virtual void Generate ()=0
virtual void Free ()=0
virtual void InvalidateHandle ()=0

Protected Attributes

GLuint m_handle
GLenum m_target
- Protected Attributes inherited from IYIGPUObject
Status m_status

Additional Inherited Members

- Public Types inherited from IYIGPUObject
enum  Status {

Constructor & Destructor Documentation

◆ CYIGLAbstractBufferObject()

CYIGLAbstractBufferObject::CYIGLAbstractBufferObject ( GLuint  handle)

◆ ~CYIGLAbstractBufferObject()

virtual CYIGLAbstractBufferObject::~CYIGLAbstractBufferObject ( )

Member Function Documentation

◆ GetHandle()

virtual GLuint CYIGLAbstractBufferObject::GetHandle ( )

◆ GetTarget()

virtual GLenum CYIGLAbstractBufferObject::GetTarget ( )

◆ SetTarget()

virtual void CYIGLAbstractBufferObject::SetTarget ( GLenum  target)

glBind* functions take a target parameter to determine what sort of object the user intends to create. We provide an interface for specifying this parameter so that users have access to any platform-available buffer types that they may have access to on their target platforms.


texture2D.SetTarget(GL_TEXTURE_2D); //Specify that this is a 2D texture for the subsequent bind calls
CYIGLBufferObject vbo;
vbo.SetTarget(GL_ARRAY_BUFFER); //Specify that this is a vertex buffer object for the subsequent bind calls

Member Data Documentation

◆ m_handle

GLuint CYIGLAbstractBufferObject::m_handle

◆ m_target

GLenum CYIGLAbstractBufferObject::m_target

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