|
Blender
V2.93
|
#include <gpu_shader_private.hh>
Inherited by blender::gpu::GLShader.
Public Member Functions | |
| virtual void | vertex_shader_from_glsl (MutableSpan< const char * > sources)=0 |
| virtual void | geometry_shader_from_glsl (MutableSpan< const char * > sources)=0 |
| virtual void | fragment_shader_from_glsl (MutableSpan< const char * > sources)=0 |
| virtual bool | finalize (void)=0 |
| virtual void | transform_feedback_names_set (Span< const char * > name_list, const eGPUShaderTFBType geom_type)=0 |
| virtual bool | transform_feedback_enable (GPUVertBuf *)=0 |
| virtual void | transform_feedback_disable (void)=0 |
| virtual void | bind (void)=0 |
| virtual void | unbind (void)=0 |
| virtual void | uniform_float (int location, int comp_len, int array_size, const float *data)=0 |
| virtual void | uniform_int (int location, int comp_len, int array_size, const int *data)=0 |
| virtual void | vertformat_from_shader (GPUVertFormat *) const =0 |
| virtual int | program_handle_get (void) const =0 |
| const char *const | name_get (void) const |
Creation / Destruction | |
| Shader (const char *name) | |
| virtual | ~Shader () |
Public Attributes | |
| ShaderInterface * | interface = nullptr |
Protected Member Functions | |
Debug functions | |
| void | print_log (Span< const char * > sources, char *log, const char *stage, const bool error) |
Protected Attributes | |
| char | name [64] |
Implementation of shader compilation and uniforms handling. Base class which is then specialized for each implementation (GL, VK, ...).
Definition at line 36 of file gpu_shader_private.hh.
| Shader::Shader | ( | const char * | name | ) |
Definition at line 249 of file gpu_shader.cc.
References BLI_strncpy(), and name.
|
virtual |
Definition at line 254 of file gpu_shader.cc.
References interface.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
inline |
Definition at line 70 of file gpu_shader_private.hh.
References name.
Referenced by blender::gpu::debug::check_gl_resources().
|
protected |
Definition at line 66 of file gpu_shader.cc.
References ARRAY_SIZE, BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_nappend(), BLI_dynstr_new(), BLI_string_join_arrayN(), CLG_color_support_get(), CLG_FLAG_USE, CLG_log_str(), CLG_SEVERITY_ERROR, CLG_SEVERITY_WARN, blender::Span< T >::data(), ELEM, error(), CLG_LogType::flag, GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DEVICE_NVIDIA, GPU_DRIVER_OFFICIAL, GPU_OS_ANY, GPU_OS_MAC, GPU_OS_UNIX, GPU_type_matches(), CLG_LogType::level, KDL::log(), LOG, MEM_freeN, blender::Span< T >::size(), stage, STREQLEN, CLG_LogRef::type, and type.
Referenced by blender::gpu::GLShader::finalize().
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
Referenced by GPU_shader_unbind().
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
|
pure virtual |
Implemented in blender::gpu::GLShader.
| ShaderInterface* blender::gpu::Shader::interface = nullptr |
Uniform & attribute locations for shader.
Definition at line 39 of file gpu_shader_private.hh.
Referenced by ~Shader().
|
protected |
For debugging purpose.
Definition at line 43 of file gpu_shader_private.hh.
Referenced by blender::gpu::GLShader::GLShader(), name_get(), Shader(), and blender::gpu::GLShader::vertformat_from_shader().