2017-10-30 23:44:40 +01:00
|
|
|
#ifndef _LIBRW_DRAWBUFFER_HPP_
|
|
|
|
#define _LIBRW_DRAWBUFFER_HPP_
|
2018-12-09 23:06:02 +01:00
|
|
|
|
2016-04-07 01:13:46 +01:00
|
|
|
#include <gl/gl_core_3_3.h>
|
2014-02-10 05:43:20 +00:00
|
|
|
|
|
|
|
class GeometryBuffer;
|
2014-02-13 10:55:11 +00:00
|
|
|
|
2016-09-09 21:13:21 +01:00
|
|
|
/**
|
|
|
|
* DrawBuffer stores VAO state
|
2014-02-13 10:55:11 +00:00
|
|
|
*/
|
2014-02-10 05:43:20 +00:00
|
|
|
class DrawBuffer {
|
2016-09-09 21:13:21 +01:00
|
|
|
GLuint vao;
|
|
|
|
GLenum facetype;
|
|
|
|
|
2014-02-10 05:43:20 +00:00
|
|
|
public:
|
2016-09-09 21:13:21 +01:00
|
|
|
DrawBuffer();
|
|
|
|
~DrawBuffer();
|
|
|
|
|
|
|
|
GLuint getVAOName() const {
|
|
|
|
return vao;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setFaceType(GLenum ft) {
|
|
|
|
facetype = ft;
|
|
|
|
}
|
|
|
|
|
|
|
|
GLenum getFaceType() const {
|
|
|
|
return facetype;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds a Geometry Buffer to the Draw Buffer.
|
|
|
|
*/
|
|
|
|
void addGeometry(GeometryBuffer* gbuff);
|
2014-02-10 05:43:20 +00:00
|
|
|
};
|
|
|
|
|
2016-09-09 21:13:21 +01:00
|
|
|
#endif
|