rpcsx/rpcs3/Emu/GS/GL/GLBuffers.h
DH 0aff049960 - Improved Vertex & Fragment Shader Decompilers.
- Fixed some FPR instructions.
- Implemented more GCM syscalls.
- Fixed callbacks alert.
2013-08-17 01:22:26 +03:00

49 lines
No EOL
884 B
C++

#pragma once
#include "OpenGL.h"
struct GLBufferObject
{
protected:
Array<GLuint> m_id;
GLuint m_type;
public:
GLBufferObject();
GLBufferObject(u32 type);
~GLBufferObject();
void Create(GLuint type, u32 count = 1);
void Delete();
void Bind(u32 type, u32 num);
void UnBind(u32 type);
void Bind(u32 num = 0);
void UnBind();
void SetData(u32 type, const void* data, u32 size, u32 usage = GL_DYNAMIC_DRAW);
void SetData(const void* data, u32 size, u32 usage = GL_DYNAMIC_DRAW);
void SetAttribPointer(int location, int size, int type, int pointer, int stride, bool normalized = false);
bool IsCreated() const;
};
struct GLvbo : public GLBufferObject
{
GLvbo();
void Create(u32 count = 1);
};
class GLvao
{
protected:
GLuint m_id;
public:
GLvao();
~GLvao();
void Create();
void Bind() const;
static void Unbind();
void Delete();
bool IsCreated() const;
};