37 lines
691 B
C++
37 lines
691 B
C++
#ifndef __OPENGLPLAYGROUND_OVERLAY_HH__
|
|
#define __OPENGLPLAYGROUND_OVERLAY_HH__
|
|
|
|
#include <vector>
|
|
#include <glbinding/gl/types.h>
|
|
|
|
#include "VBOManager.hh"
|
|
|
|
class Program;
|
|
|
|
struct ovlVertexAttribs {
|
|
uint16_t vertex[2];
|
|
uint16_t texCoords[2];
|
|
} __attribute__((__packed__));
|
|
|
|
class Overlay {
|
|
public:
|
|
Overlay(VBOManager& vboManager, std::vector<ovlVertexAttribs> const& vas,
|
|
Program& prog);
|
|
|
|
Overlay(Overlay const& copy) = delete;
|
|
Overlay& operator=(Overlay const& copy) = delete;
|
|
|
|
~Overlay();
|
|
|
|
void draw(Program *override = nullptr) const;
|
|
|
|
private:
|
|
VBOManager& vboManager_;
|
|
VBOManager::VBOAlloc vbo_;
|
|
Program& prog_;
|
|
gl::GLuint vaID_;
|
|
size_t vertices_;
|
|
};
|
|
|
|
#endif
|