bloom shader

This commit is contained in:
Eduardo Bart
2011-12-07 21:43:12 -02:00
parent b5cf4ad2c4
commit 5ec386b35f
10 changed files with 136 additions and 126 deletions

View File

@@ -24,10 +24,10 @@
#define PAINTERSHADER_H
#include "shaderprogram.h"
#include "coordsbuffer.h"
class PainterShaderProgram : public ShaderProgram
{
public:
enum {
VERTEX_COORDS_ATTR = 0,
TEXTURE_COORDS_ATTR = 1,
@@ -38,22 +38,22 @@ public:
TEXTURE_UNIFORM = 4,
TICKS_UNIFORM = 5
};
public:
enum DrawMode {
Triangles = GL_TRIANGLES,
TriangleStrip = GL_TRIANGLE_STRIP
};
bool link();
void setProjectionMatrix(GLfloat projectionMatrix[3][3]);
void setColor(const Color& color);
void setOpacity(GLfloat opacity);
void setTexture(const TexturePtr& texture);
void setVertexCoords(const GLfloat *vertices);
void setTextureCoords(const GLfloat *textureCoords);
void prepareForDraw();
void drawTriangleStrip(int numVertices);
void drawTriangles(int numVertices);
void releaseFromDraw();
void draw(const CoordsBuffer& coordsBuffer, DrawMode drawMode = Triangles);
private:
Boolean<false> m_mustDisableVertexArray;
Boolean<false> m_mustDisableTexCoordsArray;
DrawMode m_drawMode;
};
#endif