Compute Shader.
More...
#include <ComputeShader.hpp>
|
enum | BarrierBit : GLbitfield {
BarrierBit::VertexAttribArray = GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT,
BarrierBit::ElementArrayBarrier = GL_ELEMENT_ARRAY_BARRIER_BIT,
BarrierBit::Uniform = GL_UNIFORM_BARRIER_BIT,
BarrierBit::TextureFetch = GL_TEXTURE_FETCH_BARRIER_BIT,
BarrierBit::ShaderImageAccess = GL_SHADER_IMAGE_ACCESS_BARRIER_BIT,
BarrierBit::Commande = GL_COMMAND_BARRIER_BIT,
BarrierBit::PixelBuffer = GL_PIXEL_BUFFER_BARRIER_BIT,
BarrierBit::TextureUpdate = GL_TEXTURE_UPDATE_BARRIER_BIT,
BarrierBit::BufferUpdate = GL_BUFFER_UPDATE_BARRIER_BIT,
BarrierBit::Framebuffer = GL_FRAMEBUFFER_BARRIER_BIT,
BarrierBit::TransformFeedback = GL_TRANSFORM_FEEDBACK_BARRIER_BIT,
BarrierBit::AtomicCounter = GL_ATOMIC_COUNTER_BARRIER_BIT,
BarrierBit::ShaderStorage = GL_SHADER_STORAGE_BARRIER_BIT,
BarrierBit::All = GL_ALL_BARRIER_BITS
} |
| Barrier Bits. More...
|
|
|
std::string | _srcPath = "" |
| Path to the last file read by loadFromFile. More...
|
|
bool | _compiled = false |
| Says if the shader have already been successfully compiled. More...
|
|
GLuint | _handle |
| OpenGL name of the managed object. More...
|
|
Compute Shader.
This type of shader can hold a program and be used alone.
- See also
- Shader
-
Program
ComputeShader::ComputeShader |
( |
bool |
standalone = true | ) |
|
Default constructor.
- Parameters
-
standalone | If true, attach the shader to a new dedicated program. |
ComputeShader::~ComputeShader |
( |
| ) |
|
void ComputeShader::compile |
( |
| ) |
|
void ComputeShader::compute |
( |
GLint |
x, |
|
|
GLint |
y = 1 , |
|
|
GLint |
z = 1 |
|
) |
| const |
|
inline |
Starts the execution of the compute shader.
- Parameters
-
x | Number of workgroups to start on the x 'axis' |
y | Number of workgroups to start on the y 'axis' |
z | Number of workgroups to start on the z 'axis' |
void ComputeShader::dispatchCompute |
( |
GLint |
x, |
|
|
GLint |
y = 1 , |
|
|
GLint |
z = 1 |
|
) |
| |
|
inlinestatic |
Starts the execution of the curently 'bound' compute shader.
- Parameters
-
x | Number of workgroups to start on the x 'axis' |
y | Number of workgroups to start on the y 'axis' |
z | Number of workgroups to start on the z 'axis' |
Program & ComputeShader::getProgram |
( |
| ) |
|
|
inline |
const Program & ComputeShader::getProgram |
( |
| ) |
const |
|
inline |
Note: Shader must be compiled and associated to a linked Program.
- Returns
- Workgroup sizes as specified in the compute shader.
- See also
- compile()
-
Program
- Parameters
-
- See also
- glMemoryBarrier
- Parameters
-
- See also
- glMemoryBarrier
void ComputeShader::use |
( |
| ) |
const |
The documentation for this class was generated from the following files: