Blender
V3.3
|
#include <shader.h>
Public Member Functions | |
OpenGLShader ()=default | |
virtual | ~OpenGLShader ()=default |
int | get_position_attrib_location () |
int | get_tex_coord_attrib_location () |
void | bind (int width, int height) |
void | unbind () |
Static Public Attributes | |
static constexpr const char * | position_attribute_name = "pos" |
static constexpr const char * | tex_coord_attribute_name = "texCoord" |
Protected Member Functions | |
uint | get_shader_program () |
void | create_shader_if_needed () |
void | destroy_shader () |
Protected Attributes | |
int | position_attribute_location_ = -1 |
int | tex_coord_attribute_location_ = -1 |
uint | shader_program_ = 0 |
int | image_texture_location_ = -1 |
int | fullscreen_location_ = -1 |
bool | shader_compile_attempted_ = false |
Definition at line 10 of file app/opengl/shader.h.
|
default |
|
virtualdefault |
void OpenGLShader::bind | ( | int | width, |
int | height | ||
) |
Definition at line 139 of file app/opengl/shader.cpp.
References create_shader_if_needed(), fullscreen_location_, height, image_texture_location_, shader_program_, and width.
Referenced by OpenGLDisplayDriver::draw().
|
protected |
Definition at line 161 of file app/opengl/shader.cpp.
References compile_shader_program(), destroy_shader(), fullscreen_location_, image_texture_location_, LOG, shader_compile_attempted_, and shader_program_.
Referenced by bind().
|
protected |
Definition at line 191 of file app/opengl/shader.cpp.
References shader_program_.
Referenced by create_shader_if_needed().
int OpenGLShader::get_position_attrib_location | ( | ) |
Definition at line 121 of file app/opengl/shader.cpp.
References get_shader_program(), position_attribute_location_, and position_attribute_name.
Referenced by OpenGLDisplayDriver::draw().
|
protected |
Definition at line 156 of file app/opengl/shader.cpp.
References shader_program_.
Referenced by get_position_attrib_location(), and get_tex_coord_attrib_location().
int OpenGLShader::get_tex_coord_attrib_location | ( | ) |
Definition at line 130 of file app/opengl/shader.cpp.
References get_shader_program(), tex_coord_attribute_location_, and tex_coord_attribute_name.
Referenced by OpenGLDisplayDriver::draw().
void OpenGLShader::unbind | ( | ) |
Definition at line 152 of file app/opengl/shader.cpp.
Referenced by OpenGLDisplayDriver::draw().
|
protected |
Definition at line 38 of file app/opengl/shader.h.
Referenced by bind(), and create_shader_if_needed().
|
protected |
Definition at line 37 of file app/opengl/shader.h.
Referenced by bind(), and create_shader_if_needed().
|
protected |
Definition at line 33 of file app/opengl/shader.h.
Referenced by get_position_attrib_location().
|
staticconstexpr |
Definition at line 12 of file app/opengl/shader.h.
Referenced by get_position_attrib_location().
|
protected |
Definition at line 42 of file app/opengl/shader.h.
Referenced by create_shader_if_needed().
|
protected |
Definition at line 36 of file app/opengl/shader.h.
Referenced by bind(), create_shader_if_needed(), destroy_shader(), and get_shader_program().
|
protected |
Definition at line 34 of file app/opengl/shader.h.
Referenced by get_tex_coord_attrib_location().
|
staticconstexpr |
Definition at line 13 of file app/opengl/shader.h.
Referenced by get_tex_coord_attrib_location().