Blender  V3.3
Public Member Functions | List of all members
blender::gpu::GLShaderInterface Class Reference

#include <gl_shader_interface.hh>

Inheritance diagram for blender::gpu::GLShaderInterface:
blender::gpu::ShaderInterface

Public Member Functions

 MEM_CXX_CLASS_ALLOC_FUNCS ("GLShaderInterface")
 
Creation / Destruction
 GLShaderInterface (GLuint program, const shader::ShaderCreateInfo &info)
 
 GLShaderInterface (GLuint program)
 
 ~GLShaderInterface ()
 
Batch Reference
void ref_add (GLVaoCache *ref)
 
void ref_remove (GLVaoCache *ref)
 
- Public Member Functions inherited from blender::gpu::ShaderInterface
 ShaderInterface ()
 
 ShaderInterface (const shader::ShaderCreateInfo &info)
 
virtual ~ShaderInterface ()
 
void debug_print ()
 
const ShaderInputattr_get (const char *name) const
 
const ShaderInputubo_get (const char *name) const
 
const ShaderInputubo_get (const int binding) const
 
const ShaderInputuniform_get (const char *name) const
 
const ShaderInputtexture_get (const int binding) const
 
const ShaderInputssbo_get (const char *name) const
 
const ShaderInputssbo_get (const int binding) const
 
const char * input_name_get (const ShaderInput *input) const
 
int32_t uniform_builtin (const GPUUniformBuiltin builtin) const
 
int32_t ubo_builtin (const GPUUniformBlockBuiltin builtin) const
 

Additional Inherited Members

- Public Attributes inherited from blender::gpu::ShaderInterface
ShaderInputinputs_ = nullptr
 
char * name_buffer_ = nullptr
 
uint attr_len_ = 0
 
uint ubo_len_ = 0
 
uint uniform_len_ = 0
 
uint ssbo_len_ = 0
 
uint16_t enabled_attr_mask_ = 0
 
uint16_t enabled_ubo_mask_ = 0
 
uint8_t enabled_ima_mask_ = 0
 
uint64_t enabled_tex_mask_ = 0
 
uint16_t enabled_ssbo_mask_ = 0
 
int32_t builtins_ [GPU_NUM_UNIFORMS]
 
int32_t builtin_blocks_ [GPU_NUM_UNIFORM_BLOCKS]
 
- Protected Member Functions inherited from blender::gpu::ShaderInterface
uint32_t set_input_name (ShaderInput *input, char *name, uint32_t name_len) const
 
void copy_input_name (ShaderInput *input, const StringRefNull &name, char *name_buffer, uint32_t &name_buffer_offset) const
 
void sort_inputs ()
 
- Static Protected Member Functions inherited from blender::gpu::ShaderInterface
static const char * builtin_uniform_name (GPUUniformBuiltin u)
 
static const char * builtin_uniform_block_name (GPUUniformBlockBuiltin u)
 

Detailed Description

Implementation of Shader interface using OpenGL.

Definition at line 31 of file gl_shader_interface.hh.

Constructor & Destructor Documentation

◆ GLShaderInterface() [1/2]

blender::gpu::GLShaderInterface::GLShaderInterface ( GLuint  program,
const shader::ShaderCreateInfo info 
)

Definition at line 333 of file gl_shader_interface.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::gpu::ShaderInterface::attr_len_, blender::gpu::shader::ShaderCreateInfo::batch_resources_, blender::gpu::ShaderInput::binding, BLI_assert_msg, blender::gpu::ShaderInterface::builtin_blocks_, blender::gpu::ShaderInterface::builtin_uniform_block_name(), blender::gpu::ShaderInterface::builtin_uniform_name(), blender::gpu::ShaderInterface::builtins_, blender::StringRefNull::c_str(), blender::gpu::ShaderInterface::copy_input_name(), blender::gpu::ShaderInterface::enabled_attr_mask_, blender::gpu::ShaderInterface::enabled_ima_mask_, blender::gpu::ShaderInterface::enabled_ssbo_mask_, blender::gpu::ShaderInterface::enabled_tex_mask_, blender::gpu::ShaderInterface::enabled_ubo_mask_, blender::gpu::GLContext::explicit_location_support, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), GPU_NUM_UNIFORM_BLOCKS, GPU_NUM_UNIFORMS, blender::gpu::shader::ShaderCreateInfo::VertIn::index, input, blender::gpu::ShaderInterface::inputs_, blender::gpu::shader::ShaderCreateInfo::interface_names_size_, blender::gpu::ShaderInput::location, MEM_callocN, MEM_mallocN, blender::gpu::shader::ShaderCreateInfo::VertIn::name, blender::gpu::shader::ShaderCreateInfo::PushConst::name, blender::gpu::ShaderInterface::name_buffer_, blender::gpu::shader::ShaderCreateInfo::pass_resources_, blender::compositor::program, blender::gpu::shader::ShaderCreateInfo::push_constants_, blender::gpu::GLContext::shader_draw_parameters_support, blender::StringRefBase::size(), blender::gpu::ShaderInterface::sort_inputs(), blender::gpu::ShaderInterface::ssbo_len_, blender::gpu::ShaderInterface::ubo_get(), blender::gpu::ShaderInterface::ubo_len_, blender::gpu::ShaderInterface::uniform_get(), blender::gpu::ShaderInterface::uniform_len_, and blender::gpu::shader::ShaderCreateInfo::vertex_inputs_.

◆ GLShaderInterface() [2/2]

blender::gpu::GLShaderInterface::GLShaderInterface ( GLuint  program)

◆ ~GLShaderInterface()

blender::gpu::GLShaderInterface::~GLShaderInterface ( )

Definition at line 489 of file gl_shader_interface.cc.

Member Function Documentation

◆ MEM_CXX_CLASS_ALLOC_FUNCS()

blender::gpu::GLShaderInterface::MEM_CXX_CLASS_ALLOC_FUNCS ( "GLShaderInterface"  )

◆ ref_add()

void blender::gpu::GLShaderInterface::ref_add ( GLVaoCache ref)

Definition at line 504 of file gl_shader_interface.cc.

◆ ref_remove()

void blender::gpu::GLShaderInterface::ref_remove ( GLVaoCache ref)

Definition at line 515 of file gl_shader_interface.cc.


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