Tucano  0.1
A library for rapid prototyping with modern OpenGL and GLSL
ComputeShaderTest Class Reference

#include <computeShaderTest.hpp>

Inheritance diagram for ComputeShaderTest:

Public Member Functions

 ComputeShaderTest (const char *name, int currentWidth, int currentHeight)
 Default Constructor: More...
 
virtual void initialize ()
 Initializes the shaders and creates the FBO. More...
 
virtual void render (Mesh *mesh=NULL, Trackball *cameraTrackball=NULL, Trackball *lightTrackball=NULL)
 Renders the scene. More...
 
virtual void reloadShaders ()
 Reloads all shaders, reading the files again. More...
 
Shader * getFirstPassShader ()
 
 ~ComputeShaderTest ()
 Default destructor. Just deletes the shaders and destroy the buffers. More...
 
Shader * getShader ()
 

Protected Member Functions

void setOpenGLMatricesUniforms (Shader *currentShader, Trackball *cameraTrackball, Trackball *lightTrackball)
 Set opengl matrices. More...
 
void createSSBO ()
 Creates the Shader Storage Buffer Object. More...
 
void createImage ()
 Creates the final image to store compute shader manipulations. More...
 

Protected Attributes

Shader * firstPassShader
 Shader used to offscreen rendering. More...
 
Shader * shader
 Compute shader. More...
 
Shader * thirdPassShader
 Shader used in back-buffer rendering. More...
 
Framebuffer * fbo
 Framebuffer. More...
 
GLuint ssbo
 Shader Storage Buffer Object. More...
 
GLuint finalImage
 Image to store the compute shader manipulations. More...
 

Detailed Description

Just beginning to play with Compute Shaders.

Constructor & Destructor Documentation

ComputeShaderTest::ComputeShaderTest ( const char *  name,
int  currentWidth,
int  currentHeight 
)
inline

Default Constructor:

ComputeShaderTest::~ComputeShaderTest ( )
inline

Default destructor. Just deletes the shaders and destroy the buffers.

Member Function Documentation

void ComputeShaderTest::createImage ( )
protected

Creates the final image to store compute shader manipulations.

void ComputeShaderTest::createSSBO ( )
protected

Creates the Shader Storage Buffer Object.

Shader* ComputeShaderTest::getFirstPassShader ( )
inline
Shader* ComputeShaderTest::getShader ( )
inline
virtual void ComputeShaderTest::initialize ( )
virtual

Initializes the shaders and creates the FBO.

virtual void ComputeShaderTest::reloadShaders ( )
virtual

Reloads all shaders, reading the files again.

virtual void ComputeShaderTest::render ( Mesh *  mesh = NULL,
Trackball *  cameraTrackball = NULL,
Trackball *  lightTrackball = NULL 
)
virtual

Renders the scene.

void ComputeShaderTest::setOpenGLMatricesUniforms ( Shader *  currentShader,
Trackball *  cameraTrackball,
Trackball *  lightTrackball 
)
protected

Set opengl matrices.

Member Data Documentation

Framebuffer* ComputeShaderTest::fbo
protected

Framebuffer.

GLuint ComputeShaderTest::finalImage
protected

Image to store the compute shader manipulations.

Shader* ComputeShaderTest::firstPassShader
protected

Shader used to offscreen rendering.

Shader* ComputeShaderTest::shader
protected

Compute shader.

GLuint ComputeShaderTest::ssbo
protected

Shader Storage Buffer Object.

Shader* ComputeShaderTest::thirdPassShader
protected

Shader used in back-buffer rendering.


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