HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_VKShader Class Reference

#include <RV_VKShaderCompile.h>

+ Inheritance diagram for RV_VKShader:

Classes

class  Factory
 

Public Member Functions

 RV_VKShader (const char *name, int shader_version=450)
 
 ~RV_VKShader () override
 
int64 getMemoryUsage (bool inclusive) const override
 
bool getSpvModules (UT_Map< RE_ShaderType, UT_Array< uint8_t >> &modules_out, UT_WorkBuffer &messages_out)
 
bool attachShader (RE_Render *r, RE_ShaderStage *shader, UT_String *messages=nullptr) override
 
bool detachShader (RE_Render *r, RE_ShaderStage *shader) override
 
bool linkShaders (RE_Render *r, UT_String *messages_out=nullptr) override
 
void clearShaders (RE_Render *r, RE_ShaderType stype=RE_SHADER_ALL) override
 Clears and deletes all the shader objects of a certain type (or all) More...
 
RE_ShaderStagenewShader (RE_ShaderType stage, const char *name=0) override
 
bool validateShader (RE_Render *r, UT_String *messages=nullptr) override
 
bool setGeometryParms (RE_Render *r, int max_vertices, RE_PrimType input, RE_PrimType output) override
 Specify geometry shader parameters. More...
 
bool setVertexInput (RE_Render *r, const char *name, int vertex_index) override
 
bool setFragmentOutput (RE_Render *r, const char *name, int buffer_num) override
 
bool bindTextureMap (RE_Render *r, const UT_StringHolder &name, const char *mapname, const char *relative_to) override
 
RE_TextureDimension getTextureMapType (RE_Render *r, const UT_StringHolder &name) override
 Return the texture type for the sampler named 'name'. More...
 
bool bindVariableInt (RE_Render *r, const UT_StringHolder &name, const int *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariableInt2 (RE_Render *r, const UT_StringHolder &name, const int *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer vector-2. More...
 
bool bindVariableInt3 (RE_Render *r, const UT_StringHolder &name, const int *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer vector-3. More...
 
bool bindVariableInt4 (RE_Render *r, const UT_StringHolder &name, const int *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer vector-4. More...
 
bool bindUint64 (RE_Render *r, const UT_StringHolder &name, uint64 *val, int array_size=1, int *saved_idx=nullptr) override
 64b Integer handle for bindless texturing More...
 
bool bindVariable1 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable2 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable3 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable4 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable1 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable2 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable3 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindVariable4 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindMatrix2 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindMatrix3 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindMatrix4 (RE_Render *r, const UT_StringHolder &name, const fpreal32 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindMatrix2 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindMatrix3 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindMatrix4 (RE_Render *r, const UT_StringHolder &name, const fpreal64 *val, int array_size=1, int *saved_idx=nullptr) override
 Generic Integer scalar. More...
 
bool bindTexture (RE_Render *r, const UT_StringHolder &name, RE_Texture *tex, int *saved_idx=nullptr) override
 
bool bindImage (RE_Render *r, const UT_StringHolder &name, RE_Texture *image, RE_BufferAccess image_access) override
 
bool bindImageLayer (RE_Render *r, const UT_StringHolder &name, RE_Texture *image, RE_BufferAccess image_access, int layer) override
 
void printUniforms (RE_Render *r, std::ostream *os=nullptr) const override
 Prints all the active uniforms plus their values to stream os (or cerr) More...
 
void loadShaderTexMaps (RE_Render *r) override
 Loads texture maps specified by the RE_TextureMap bindTextureMap() More...
 
void loadBoundTextures (RE_Render *r) override
 
void unloadBoundTextures (RE_Render *r) override
 
void applyShader (RE_Render *r, bool update_re=true) override
 
void removeShader (RE_Render *r, bool update_re=true) override
 
void cleanup (RE_Render *r) override
 
re_LibFuncgetShaderLibrary () const override
 
- Public Member Functions inherited from RE_Shader
 RE_Shader (const char *program_name, int shader_version)
 
virtual ~RE_Shader ()
 
exint getUniqueID () const
 
void setRegisterProgram (bool register_program)
 
const char * getName () const
 Readable name of the shader. More...
 
const char * getDefines () const
 Any define commands used to alter this shader. More...
 
int getProgram () const
 Raw GL id of the shader. More...
 
bool isLinked () const
 True if the shader has been successfully linked. More...
 
int getCodeVersion () const
 Returns the version of the shader (110,120,130,140,150,330,400,410). More...
 
void useHoudiniLibraryFuncs ()
 If true, this shader may use Houdini's builtin functions. More...
 
void useDefaultAttribMap (bool enable=true)
 If true, this shader follows the default Houdini attribute map. More...
 
void useExplicitAttribMap (bool enable=true)
 
RE_ShaderStagegetShader (const char *shader_name, RE_ShaderType hint=RE_SHADER_ALL)
 Returns an attached shader by the given name. More...
 
int getLinkSerial () const
 Bumped every time a link is performed (uniforms invalidated, etc). More...
 
bool hasShader (RE_ShaderType type) const
 
void disableShadingRate ()
 
int getNumTextures () const
 Return the number of samplers this shader references. More...
 
int getNumImages () const
 
const char * getTextureSamplerName (int tex_index) const
 Return the name of a sampler uniform Return the texture sampler name of the enumerated samplers at 'tex_index' Must be within [0, getNumTextures()-1]. More...
 
RE_TextureDimension getTextureSamplerType (int tex_index) const
 Return the texture sampler type at 'tex_index' [0, getNumTextures()-1]. More...
 
UT_StringHolder findSamplerAtUnit (int tex_unit) const
 
int getUniformTextureUnit (const UT_StringHolder &uniform_name, int array_index=0) const
 return the texture unit of sampler 'uniform_name' Return the texture unit this sampler has been assigned to, or -1 if 'uniform_name' does not exist, or is not a sampler. array_index is used to identify indices of sampler arrays. More...
 
bool setUniformTextureUnit (RE_Render *r, const UT_StringHolder &uniform_name, int unit_index)
 Set a binding point for the given sampler. More...
 
int getUniformImageUnit (const UT_StringHolder &uniform_name) const
 return the image unit of sampler 'uniform_name' Return the image unit this image uniform has been assigned to, or -1 if 'uniform_name' does not exist, or is not a image uniform. Images are different than textures, used by RE_EXT_IMAGE_LOAD_STORE (GL4.2). More...
 
RE_UniformType getUniformType (const UT_StringHolder &uniform_name) const
 
int getNumUniforms () const
 Returns the number of active uniforms in this shader. More...
 
const char * getUniformName (int idx) const
 Returns the name of active uniform 'idx' [0, getNumUniforms()-1]. More...
 
int getUniformLocation (int idx) const
 Return the GL uniform location of uniform 'idx' [0, getNumUniforms()-1]. More...
 
RE_UniformType getUniformType (int idx) const
 Return the GL uniform type 'idx' [ 0, getNumUniforms()-1]. More...
 
int getBlockIndexForUniform (int idx) const
 Return the index of the uniform block a uniform is in, -1 for none. More...
 
bool setTextureHandle (RE_Render *r, const UT_StringHolder &uniform_name, RE_Texture *texture, int *saved_idx=0)
 
bool clearTextureHandle (RE_Render *r, const UT_StringHolder &uniform_name, int *saved_idx=0)
 Remove a bindless handle from the uniform, clearing it to 0 (no tex). More...
 
virtual bool bindUniform (RE_Render *r, const RE_Uniform *uniform, int index=-1)
 Bind an RE_Uniform's values to the corresponding GL uniform Bind an RE_Uniform to this shader. If 'uniform' is an array uniform then 'index' specifies which array element to bind. 'index' must be less than uniform->getSize(). Pass -1 for 'index' (the default) to bind all elements of an array; passing -1 for non-arrays is safe and is equivalent to passing 0. More...
 
bool hasUniform (const UT_StringHolder &uniform_name) const
 returns true if the named uniform exists in the shader. More...
 
bool hasBuiltInUniform (RE_UniformBuiltIn uniform) const
 Queries the use of a builtin uniform Returns true if this shader has the specified built-in uniform. 'uniform' must be an RE_UniformBuiltIn. Note that certain built-in uniforms may only be supported for certain languages. More...
 
const UT_IntArraygetBuiltInUniformList () const
 Returns a list of RE_UniformBuiltIn IDs this shader uses. More...
 
void bindBuiltIns (RE_Render *r, bool force_update=false)
 Bind all builtin uniforms. Bind all builtin uniforms this shader uses to their current values in RE_Render. More...
 
void invalidateUniform (RE_UniformBuiltIn uniform)
 
virtual int getMaxUniformBlocks (RE_Render *)
 Returns the OpenGL maximum number of supported blocks. More...
 
virtual int getMaxUniformBlockSizeB (RE_Render *)
 Returns the OpenGL maximum size of a uniform block, in bytes. More...
 
virtual int getNumUniformBlocks () const
 Returns the number of blocks and specific uniform blocks. More...
 
virtual RE_UniformBlockHandle getUniformBlock (int) const
 Return an attached uniform block by index. More...
 
virtual RE_UniformBlockHandle getUniformBlock (const char *name) const
 Return an attached uniform block by name. More...
 
virtual int getUniformBlockIndex (const char *name) const
 Returns the block binding point of the named block. More...
 
virtual bool attachUniformBlock (RE_UniformBlock *)
 Attach an RE_UniformBlock to this shader Attach a single uniform block to the shader. The shader owns the block while attached, and will delete it if the shader is deleted, or may delete it if linkShaders() is called and it is no longer in use. If you want to cache a block, detach it when you're done with the shader. If a block with the same name is already attached to this shader, it will be deleted. More...
 
virtual RE_UniformBlockHandle detachUniformBlock (const char *)
 Detach a named RE_UniformBlock from this shader Detach a single uniform block by name or pointer. The shader will no longer keep a reference to it, and will not delete it when relinking or when the shader is deleted. Note that a shader must have all blocks attached when executed. Detaching a uniform block does not remove the GL binding to the block, it merely removes this shader's ownership of the block (for performance reasons) More...
 
virtual bool detachUniformBlock (RE_UniformBlock *)
 Detach a specific RE_UniformBlock from this shader. More...
 
virtual bool detachAllUniformBlocks ()
 Detaches all blocks referenced by this shader. More...
 
virtual bool bindAllUniformBlocks (RE_Render *)
 
virtual bool initUniformBlock (RE_Render *r, RE_UniformBlock *block, int index=-1) const
 Initialize a uniform block based on this shader's block layout Initializes a uniform block with the proper offsets and size for block index 'index'. If index is -1, block must have the name of one of the uniform blocks in the shader. More...
 
virtual RE_UniformBlockHandle copyUniformBlock (const char *name, bool data_too) const
 Copies the structure of the named uniform block, and possibly the data. More...
 
virtual bool updateUniformBlock (const RE_UniformBlockHandle &b) const
 
virtual int overrideUniformBlock (RE_UniformBlock *block, int block_index=-1)
 
virtual void removeOverrideBlock (int)
 Remove an override block from the shader, by index. More...
 
virtual void removeOverrideBlock (RE_UniformBlock *b)
 Remove a specific override block from the shader. More...
 
virtual void removeOverrideBlocks ()
 Remove all override blocks from the shader. More...
 
virtual RE_UniformBlockHandle getOverrideBlock (int) const
 Return the currently bound override block for an index, if any is bound. More...
 
virtual RE_UniformBlockHandle createStorageBlock (const char *name, int array_size)
 
virtual RE_UniformBlockHandle getStorageBlock (const char *name)
 Return the block definition for storage block 'name'. More...
 
virtual RE_UniformBlockHandle getStorageBlockBinding (const char *name)
 Return the storage block bound to 'name' (bound by attachStorageBlock) More...
 
virtual RE_VertexArraygetStorageBufferBinding (const char *name)
 Return the raw buffer bound to 'name' (bound by attachStorageBlock) More...
 
virtual bool attachStorageBlock (const RE_UniformBlockHandle &block)
 
virtual bool detachStorageBlock (const RE_UniformBlockHandle &block)
 
virtual bool attachStorageBuffer (RE_VertexArray *raw_buffer)
 
virtual bool detachStorageBuffer (RE_VertexArray *raw_buffer)
 
virtual bool detachStorageBinding (const char *bind_name)
 Unbind the block or buffer attached to binding point 'bind_name'. More...
 
bool hasShaderAttribs () const
 Return if the vertex shader has input attributes. More...
 
int getNumShaderAttribs () const
 Return the number of vertex shader input attributes. More...
 
bool hasTessellation () const
 
const char * getShaderAttribName (int i) const
 Return the name of vertex shader input at index 'i'. More...
 
RE_GenericAttribID getShaderAttribGenID (int i) const
 
int getShaderAttribLocation (int i) const
 Return the GL attribute location of vertex shader input at index 'i'. More...
 
RE_GPUType getShaderAttribType (int i) const
 Return the type of vertex shader input at index 'i'. More...
 
int getShaderAttribSize (int i) const
 Return the vector size of vertex shader input at index 'i'. More...
 
const UT_StringListgetShaderAttribNames () const
 Return a string array of all vertex shader input names. More...
 
const UT_IntArraygetShaderAttribLocations () const
 Return an int array of all vertex shader input locations. More...
 
const UT_IntArraygetShaderAttribSizes () const
 Return an int array of all vertex shader input sizes. More...
 
const char * getAttribNameForLocation (int loc) const
 Returns the name of a vertex shader input at GL location 'loc'. More...
 
int getAttributeModeLoc (RE_GenericAttribID t) const
 Return the default GL location of generic vertex attribute 't'. More...
 
int getAttributeSamplerLoc (RE_GenericAttribID t) const
 Return the texture sampler unit of a texture buffer object for 't'. More...
 
int getNumBuiltinAttribs () const
 Return the number of GL-builtin vertex shader inputs (gl_Vertex, gl_*) More...
 
const char * getBuiltinAttrib (int i) const
 Return the name of GL-builtin vertex shader input at index 'i'. More...
 
int getNumBufferAttribs () const
 Return the number of texture-buffer object attributes. More...
 
const char * getBufferAttrib (int i) const
 Return the name of texture-buffer object attribute at index 'i'. More...
 
RE_GenericAttribID getBufferAttribID (int i) const
 
int getNumBufferTextures () const
 Return the number of texture buffer object samplers in this shader. More...
 
const char * getBufferTextureName (int i) const
 Name of the texture buffer object sampler at index 'i'. More...
 
RE_GPUType getBufferTextureType (int i) const
 Type of the texture buffer object sampler at index 'i' (float, int, uint) More...
 
bool hasBufferTexture (const char *name) const
 True if the shader has a texture buffer object sampler named 'name'. More...
 
bool getAttribute (const char *attrib_name, int &location, RE_GPUType &type, int &size) const
 Return information about vertex shader input 'attrib_name' Returns the location and size of the named vertex attribute, or false if it does not exist in this shader. This also includes the GL built-ins, though these will not set location type, or size; only return true/false for their presence in the shader. More...
 
bool hasAttribute (const char *attrib_name) const
 Simpler version of getAttribute() - just returns if the attribute exists. More...
 
bool getAttributeIndex (int index, UT_String &name, int &location, RE_GPUType &type, int &size) const
 Return information about vertex shader input at 'index' Similar to getAttribute(), but the name of the input does not need to be known. GL builtins are not supported by this method. index must be within [0, getNumAttribs()-1]. More...
 
void printAttributes (std::ostream *os=nullptr) const
 
bool bindZeroConstant (RE_Render *r, RE_VertexArray *array)
 Zero out the constant attribute location given by 'array' Bind a constant zero for this array. If data is non-nullptr, this data is used, otherwise the current constant data for this array is used (default 0's). More...
 
int getNumTextures (RE_ShaderType stage) const
 
void getShaderSource (RE_Render *r, UT_String &source, RE_ShaderType sh=RE_SHADER_ALL)
 Returns the shader source of some or all attached shaders. More...
 
bool prepForDrawing (RE_Render *r, RE_Geometry *obj=nullptr, RE_ElementArray *element=nullptr, RE_VertexState *state=nullptr, unsigned int vertex_stride=0, RE_OverrideList *atrbover=0, int instance_group=0)
 Prepare this shader for rendering Binds uniform buffer objects and all builtin uniforms. Optionally re-binds vertex attribute locations in 'obj'. More...
 
bool cleanupAfterDrawing (RE_Render *r, RE_Geometry *obj=nullptr, RE_VertexState *vstate=nullptr, RE_OverrideList *atrbover=0)
 
virtual bool runCompute (RE_Render *r, int num_wg_x, int num_wg_y=1, int num_wg_z=1)
 COMPUTE. More...
 
virtual bool runCompute (RE_Render *r, RE_VertexArray *wg_buffer, int offset)
 
RE_ShaderStageloadShader (RE_Render *r, RE_ShaderType stype, const char *filename, UT_String *messages=nullptr, const char *shader_name=nullptr, const char *defines="", int default_code_version=USE_GLSL_BASE_VERSION, int geom_max_verts=-1, RE_ShaderLanguage lang=RE_SHADER_LANGUAGE_GLSL, bool print_source=true)
 
RE_ShaderStageaddShader (RE_Render *r, RE_ShaderType stype, const char *shader_source, const char *shader_name, int codeversion, UT_String *messages=nullptr, bool print_source=true, RE_ShaderLanguage lang=RE_SHADER_LANGUAGE_GLSL, bool preprocess=false)
 
void getGeometryParms (int &maxverts, RE_PrimType &input_type, RE_PrimType &output_type) const
 Fetch current geometry shader values. Return the geometry shader parameters specified by setGeometryParms() or the shader itself (via layout(in=triangles), etc). More...
 
void setShadingRate (fpreal rate)
 
fpreal getShadingRate () const
 
bool isSampleShading () const
 
bool bindInt (RE_Render *r, const UT_StringHolder &name, int v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindFloat (RE_Render *r, const UT_StringHolder &name, float v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindDouble (RE_Render *r, const UT_StringHolder &name, double v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindColor (RE_Render *r, const UT_StringHolder &name, const UT_Color &c)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindColor (RE_Render *r, const UT_StringHolder &name, const UT_Color &c, fpreal alpha)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector2F &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector3F &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector4F &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector2D &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector3D &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector4D &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector2i &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector3i &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVector (RE_Render *r, const UT_StringHolder &name, const UT_Vector4i &v)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVectors (RE_Render *r, const UT_StringHolder &name, const UT_Vector2FArray &vals)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVectors (RE_Render *r, const UT_StringHolder &name, const UT_Vector3FArray &vals)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVectors (RE_Render *r, const UT_StringHolder &name, const UT_Vector4FArray &vals)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVectors (RE_Render *r, const UT_StringHolder &name, const UT_Vector2DArray &vals)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVectors (RE_Render *r, const UT_StringHolder &name, const UT_Vector3DArray &vals)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindVectors (RE_Render *r, const UT_StringHolder &name, const UT_Vector4DArray &vals)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindMatrix (RE_Render *r, const UT_StringHolder &name, const UT_Matrix2F &m)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindMatrix (RE_Render *r, const UT_StringHolder &name, const UT_Matrix3F &m)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindMatrix (RE_Render *r, const UT_StringHolder &name, const UT_Matrix4F &m)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindMatrix (RE_Render *r, const UT_StringHolder &name, const UT_Matrix2D &m)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindMatrix (RE_Render *r, const UT_StringHolder &name, const UT_Matrix3D &m)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
bool bindMatrix (RE_Render *r, const UT_StringHolder &name, const UT_Matrix4D &m)
 Set the value of a uniform. Set uniform value(s) for a specific type. False will be returned if the shader is not linked (errors?), the given name does not exist, or the type does not match the GLSL uniform type. More...
 
RE_TextureCompress getTextureFormat () const
 Override texture compression for texture bound via bindTextureMap() More...
 
void setTextureFormat (RE_TextureCompress format)
 Override texture compression for texture bound via bindTextureMap() More...
 
void limitTextureSize (bool limit, int w, int h)
 Limit the resolution of the textures to a max width and height. More...
 
bool limitTextureSize () const
 Limit the resolution of the textures to a max width and height. More...
 
int getMaxTextureWidth () const
 Limit the resolution of the textures to a max width and height. More...
 
int getMaxTextureHeight () const
 Limit the resolution of the textures to a max width and height. More...
 
void setTextureScale (float sc)
 Scale by a constant scale factor for textures bound via bindTextureMap() More...
 
float getTextureScale () const
 Scale by a constant scale factor for textures bound via bindTextureMap() More...
 
bool mipMapTextures () const
 Enable or disable mipmapping for textures bound via bindTextureMap() More...
 
void mipMapTextures (bool yes)
 Enable or disable mipmapping for textures bound via bindTextureMap() More...
 
void setAnisotropySamples (int samples)
 Set anisotropic filtering for textures bound via bindTextureMap() More...
 
int getAnisotropySamples () const
 Set anisotropic filtering for textures bound via bindTextureMap() More...
 
bool matchesLights (int light_serial, int light_id) const
 Cached RE_LightList information (uniform blocks) More...
 
void setLightID (int light_serial, int light_id, int mask)
 Cached RE_LightList information (uniform blocks) More...
 
int getLightMask () const
 Cached RE_LightList information (uniform blocks) More...
 
void addCaptureGeometry (RE_Geometry *object, bool give_ownership=false)
 Specify an RE_Geometry to collect data from Transform Feedback. Specify a geometry object to hold all the arrays for transform feedback. You retain ownership of the object unless 'give_ownership' is true. If no object is attached when the shader is linked, one will be created for you (with ownership maintained by this shader). More...
 
RE_GeometrygetCaptureGeometry (bool take_ownership=false)
 Return the capture geometry for transform feedback. More...
 
bool addFeedbackBuffer (const char *attrib_name)
 Specify a generic attribute to capture during transform feedback. More...
 
bool removeFeedbackBuffer (const char *attrib_name)
 Remove a generic attribute from the capture geometry. More...
 
void setFeedbackBufferSize (int num_vertices)
 Will generate a new owned capture geometry if one isn't present. More...
 
void clearAllFeedbackBuffers ()
 Remove all attributes from the capture gemetry. More...
 
bool hasTransformFeedback () const
 True if this shader has transform feedback varyings available. More...
 
RE_VertexArraygetFeedbackBuffer (const char *attrib_name) const
 Fetch a vertex array written to by the shader. These are only valid after the shader has been linked for transform feedback (usually due to a draw call). Returns a vertex array for the named feedback buffer. More...
 
bool isFeedbackBufferUsed (RE_BufferType glattrib, int texlevel=0) const
 Check if a feedback buffer will be written by this shader Returns true if the attribute is available to be captured. Will return false if no buffer was setup to capture the attribute, or the shader does not output that attribute. This method must be called after the shader is linked. More...
 
bool isFeedbackBufferUsed (const char *attrib) const
 Check if a feedback buffer will be written by this shader Returns true if the attribute is available to be captured. Will return false if no buffer was setup to capture the attribute, or the shader does not output that attribute. This method must be called after the shader is linked. More...
 

Additional Inherited Members

- Public Types inherited from RE_Shader
enum  { USE_GLSL_BASE_VERSION = -1, USE_SHADER_GLSL_VERSION = 0 }
 
- Static Public Member Functions inherited from RE_Shader
static RE_Shadercreate (const char *name, int shader_version=0, RE_ShaderLanguage lang=RE_SHADER_LANGUAGE_GLSL, RE_Shader::Factory *factory=nullptr)
 
static RE_ShadercreateShader (RE_Render *r, const char *name, const char **shader_files, int shader_version=USE_SHADER_GLSL_VERSION, UT_String *compile_msg=nullptr, bool use_houdini_libs=true, RE_ShaderLanguage s=RE_SHADER_LANGUAGE_GLSL, bool register_program=true, const char *extra_defines=nullptr, RE_Shader::Factory *factory=nullptr, bool dump_src_on_error=true)
 
static RE_ShadercreateShader (RE_Render *r, const char *name, const char *shader_files, int shader_version=USE_SHADER_GLSL_VERSION, UT_String *compile_msg=nullptr, bool use_houdini_libs=true, RE_ShaderLanguage s=RE_SHADER_LANGUAGE_GLSL, bool register_program=true, const char *extra_defines=nullptr, RE_Shader::Factory *factory=nullptr, bool dump_src_on_error=true)
 A version with a single string containing whitespace-separated filenames. More...
 
static RE_ShaderlookupProgram (int id)
 
static int getBaseGLSLVersion ()
 Returns the minimum GLSL version supported (base requirement) More...
 
static int getBaseGLSLVersion (RE_ShaderLanguage lang)
 Returns the minimum GLSL version supported for specific language type. More...
 
static int determineCodeVersion (const char *shader_string)
 
static RE_ShadergetShader (int program_object)
 Fetch a shader based on GL program id Returns the RE_Shader object with the specified program object if it exists; otherwise, returns nullptr. More...
 
static bool loadFile (const char *filename, const char *defines, UT_WorkBuffer &src, int &codeversion, UT_String *messages, int default_code_version=0, int max_verts=-1, bool adjust_line_num=false, bool loadingInclude=false, RE_ShaderLanguage lang=RE_SHADER_LANGUAGE_GLSL)
 
static bool getCodeBlock (const char *block_name, UT_StringHolder &block_source, RE_ShaderLanguage lang)
 
static void unregisterProgram (int program_object)
 
static void removeAllTextureRefs (RE_OGLTexture *)
 
static int loadProgramFile (RE_Render *r, const char *file, const char *basepath, UT_String &prog_name, UT_StringArray &files, UT_StringArray &files_names, UT_StringArray &inputs, UT_StringArray &outputs, UT_StringArray &defines, int &codeversion, fpreal &shading_rate, int &max_verts, bool &use_attrib_map, bool &explicit_attrib_map, int max_version, RE_ShaderLanguage &shader_lang, UT_String *msg)
 
- Protected Member Functions inherited from RE_Shader
virtual void removeTextureRefs (RE_OGLTexture *)
 
virtual int getAttributeIndex (const char *name) const
 
int getUniformIndex (const UT_StringHolder &name) const
 
bool loadHoudiniLibraryFuncs (RE_Render *r, UT_String *msg, RE_ShaderLanguage lang)
 
const char ** getTransformFeedbackAttribs (int &num_attribs)
 
void setGeomMaxVerts (int max_verts)
 
- Static Protected Member Functions inherited from RE_Shader
static void registerProgram (RE_Shader *shader, int program_object)
 
static RE_TexturegetDefaultTBO (RE_Render *r)
 
static void scanSourceForFuncs (const char *line, RE_ShaderType shtype, UT_Array< re_NeededLibFuncs > &needed, re_LibFunc *library, int glmajor, int glminor)
 
static void processCodeLine (const char *line, int line_num, const char *defines, UT_WorkBuffer &src, int &codeversion, UT_String *messages, int default_code_version, bool &found_codeversion, int max_verts, bool adjust_line_num, RE_ShaderLanguage lang)
 
- Protected Attributes inherited from RE_Shader
UT_String myProgramName
 
UT_String myExtraDefines
 
int myProgramObject
 
bool myLinkedFlag
 
bool myUseDefaultAttribMap
 
bool myUseExplicitAttribMap
 
bool myRegisterProgram
 
RE_TextureCompress myTexFormat
 
bool myLimitTextureSize
 
int myMaxTexW
 
int myMaxTexH
 
float myTextureScale
 
bool myMipMapTexture
 
int myTextureAnisotropy
 
UT_ValArray< RE_ShaderStage * > myVertexShaders
 
UT_ValArray< RE_ShaderStage * > myTessControlShaders
 
UT_ValArray< RE_ShaderStage * > myTessEvalShaders
 
UT_ValArray< RE_ShaderStage * > myGeometryShaders
 
UT_ValArray< RE_ShaderStage * > myFragmentShaders
 
UT_ValArray< RE_ShaderStage * > myComputeShaders
 
UT_IntArray myNumTexturesPerStage
 
int myGeoShaderMaxVertices
 
RE_PrimType myGeoShaderInputPrims
 
RE_PrimType myGeoShaderOutputPrims
 
UT_StringList myBuiltInAttribNames
 
UT_StringList myAttribNames
 
UT_StringList myBufferAttribNames
 
UT_Array< RE_GenericAttribIDmyBufferAttribGenIDs
 
UT_IntArray myAttribLocations
 
UT_Array< RE_GenericAttribIDmyAttribGenIDs
 
UT_Array< RE_GPUTypemyAttribTypes
 
UT_IntArray myAttribSizes
 
UT_StringList myFeedbackNames
 
UT_ValArray< RE_UniformData * > myUniforms
 
UT_IntArray myBuiltInUniforms
 
UT_IntArray myBuiltInVersion
 
UT_ValArray< const RE_Uniform * > myBuiltInLastUniform
 
UT_SymbolMap< intmyUniformTable
 
UT_SymbolMap< intmyUniformBlockTable
 
UT_IntArray myAttrModeLocs
 
UT_IntArray myAttrSamplerLocs
 
int myBuiltInMap [RE_UNIFORM_BUILT_IN__count]
 
int64 myBuiltInUniformSerial
 
int64 myRenderSerial
 
RE_VertexMapmyVertexMap
 
UT_IntArray myBufferTextures
 
UT_Array< re_NeededLibFuncs > * myNeededLibraryFuncs
 
int myCodeVersion
 
RE_GeometrymyTransformFeedbackGeometry
 
bool myTransformFeedbackGeometryOwned
 
UT_ValArray< re_VertexName * > myTransformFeedbackVertices
 
fpreal myShadingRate
 
UT_IntArray myTextureUniforms
 
UT_IntArray myImageUniforms
 
int myShaderSerial
 
int myLightsSerial
 
int myLightsId
 
int myLightMask
 
exint myUniqueID
 
UT_IntArray myDrawBoundTextures
 
UT_WorkBuffer myWorkBuffer
 

Detailed Description

Definition at line 143 of file RV_VKShaderCompile.h.

Constructor & Destructor Documentation

RV_VKShader::RV_VKShader ( const char *  name,
int  shader_version = 450 
)
RV_VKShader::~RV_VKShader ( )
override

Member Function Documentation

void RV_VKShader::applyShader ( RE_Render r,
bool  update_re = true 
)
inlineoverridevirtual

Implements RE_Shader.

Definition at line 329 of file RV_VKShaderCompile.h.

bool RV_VKShader::attachShader ( RE_Render r,
RE_ShaderStage obj,
UT_String messages = nullptr 
)
overridevirtual

Individual Shader objects can be created separately and attached. returns true if the shader was attached, and false if it was already attached.

Reimplemented from RE_Shader.

bool RV_VKShader::bindImage ( RE_Render r,
const UT_StringHolder name,
RE_Texture image,
RE_BufferAccess  image_access 
)
inlineoverridevirtual

Bind a texture to an image slot for reading, writing, or both. Requires RE_EXT_IMAGE_LOAD_STORE (or GL4.2).

Implements RE_Shader.

Definition at line 310 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindImageLayer ( RE_Render r,
const UT_StringHolder name,
RE_Texture image,
RE_BufferAccess  image_access,
int  layer 
)
inlineoverridevirtual

Bind a texture array layer, cubemap layer, or a 3D texture slice to an image slot for reading, writing, or both. Requires RE_EXT_IMAGE_LOAD_STORE (or GL4.2).

Implements RE_Shader.

Definition at line 315 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindMatrix2 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 281 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindMatrix2 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 293 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindMatrix3 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 285 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindMatrix3 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 297 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindMatrix4 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 289 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindMatrix4 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 301 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindTexture ( RE_Render r,
const UT_StringHolder name,
RE_Texture tex,
int saved_idx = nullptr 
)
inlineoverridevirtual

Sampler buffer bound to a texture. The shader manages the texture unit assignment, the binding of the texture to the texture unit, and the assingment of the sampler buffer uniform.

Implements RE_Shader.

Definition at line 305 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindTextureMap ( RE_Render r,
const UT_StringHolder name,
const char *  mapname,
const char *  relative_to 
)
inlineoverridevirtual

Bind a texture map using named textures in TIL_TextureMap. You can also bind a texture with its raw OpenGL ID using bindVariableInt().

Bind a new texture object using the mapname (filename, op:/coppath)

Implements RE_Shader.

Definition at line 218 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindUint64 ( RE_Render r,
const UT_StringHolder name,
uint64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

64b Integer handle for bindless texturing

Implements RE_Shader.

Definition at line 244 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable1 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 248 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable1 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 264 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable2 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 252 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable2 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 268 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable3 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 256 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable3 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 272 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable4 ( RE_Render r,
const UT_StringHolder name,
const fpreal32 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 260 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariable4 ( RE_Render r,
const UT_StringHolder name,
const fpreal64 val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 276 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariableInt ( RE_Render r,
const UT_StringHolder name,
const int val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer scalar.

Implements RE_Shader.

Definition at line 228 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariableInt2 ( RE_Render r,
const UT_StringHolder name,
const int val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer vector-2.

Implements RE_Shader.

Definition at line 232 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariableInt3 ( RE_Render r,
const UT_StringHolder name,
const int val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer vector-3.

Implements RE_Shader.

Definition at line 236 of file RV_VKShaderCompile.h.

bool RV_VKShader::bindVariableInt4 ( RE_Render r,
const UT_StringHolder name,
const int val,
int  array_size = 1,
int saved_idx = nullptr 
)
inlineoverridevirtual

Generic Integer vector-4.

Implements RE_Shader.

Definition at line 240 of file RV_VKShaderCompile.h.

void RV_VKShader::cleanup ( RE_Render r)
inlineoverridevirtual

Implements RE_Shader.

Definition at line 333 of file RV_VKShaderCompile.h.

void RV_VKShader::clearShaders ( RE_Render r,
RE_ShaderType  types = RE_SHADER_ALL 
)
overridevirtual

Clears and deletes all the shader objects of a certain type (or all)

Reimplemented from RE_Shader.

bool RV_VKShader::detachShader ( RE_Render r,
RE_ShaderStage shader 
)
overridevirtual

Reimplemented from RE_Shader.

int64 RV_VKShader::getMemoryUsage ( bool  inclusive) const
inlineoverridevirtual

Returns the amount of main memory (NOT graphics memory!) owned by this RE_Shader.

Reimplemented from RE_Shader.

Definition at line 149 of file RV_VKShaderCompile.h.

re_LibFunc* RV_VKShader::getShaderLibrary ( ) const
overridevirtual

Reimplemented from RE_Shader.

bool RV_VKShader::getSpvModules ( UT_Map< RE_ShaderType, UT_Array< uint8_t >> &  modules_out,
UT_WorkBuffer messages_out 
)
inline

Definition at line 155 of file RV_VKShaderCompile.h.

RE_TextureDimension RV_VKShader::getTextureMapType ( RE_Render r,
const UT_StringHolder name 
)
inlineoverridevirtual

Return the texture type for the sampler named 'name'.

Implements RE_Shader.

Definition at line 224 of file RV_VKShaderCompile.h.

bool RV_VKShader::linkShaders ( RE_Render r,
UT_String messages = nullptr 
)
overridevirtual

Links all the shaders together; called implicitly if needed by RE_Render::setShader(). Note that linking the shader will clear out any uniforms that have been set.

Reimplemented from RE_Shader.

void RV_VKShader::loadBoundTextures ( RE_Render r)
inlineoverridevirtual

Implements RE_Shader.

Definition at line 325 of file RV_VKShaderCompile.h.

void RV_VKShader::loadShaderTexMaps ( RE_Render )
inlineoverridevirtual

Loads texture maps specified by the RE_TextureMap bindTextureMap()

Implements RE_Shader.

Definition at line 324 of file RV_VKShaderCompile.h.

RE_ShaderStage* RV_VKShader::newShader ( RE_ShaderType  type,
const char *  name = 0 
)
overridevirtual

Allocate a new shader stage of the specified type, with an optional readable name.

Implements RE_Shader.

void RV_VKShader::printUniforms ( RE_Render r,
std::ostream *  os = nullptr 
) const
inlineoverridevirtual

Prints all the active uniforms plus their values to stream os (or cerr)

Reimplemented from RE_Shader.

Definition at line 321 of file RV_VKShaderCompile.h.

void RV_VKShader::removeShader ( RE_Render r,
bool  update_re = true 
)
inlineoverridevirtual

Implements RE_Shader.

Definition at line 331 of file RV_VKShaderCompile.h.

bool RV_VKShader::setFragmentOutput ( RE_Render r,
const char *  name,
int  buffer_index 
)
inlineoverridevirtual

bind fragment shader output 'name' to color attachment 'buffer_index'. Must be called before linking. Only needed for custom fragment output (ie, not gl_FragData[] or gl_FragColor).

Reimplemented from RE_Shader.

Definition at line 212 of file RV_VKShaderCompile.h.

bool RV_VKShader::setGeometryParms ( RE_Render r,
int  max_vertices,
RE_PrimType  input,
RE_PrimType  output 
)
inlineoverridevirtual

Specify geometry shader parameters.

Reimplemented from RE_Shader.

Definition at line 201 of file RV_VKShaderCompile.h.

bool RV_VKShader::setVertexInput ( RE_Render r,
const char *  name,
int  vertex_index 
)
inlineoverridevirtual

bind vertex shader input 'name' to vertex array index 'vertex_index'. Must be called before linking, or a re-link must be done.

Reimplemented from RE_Shader.

Definition at line 207 of file RV_VKShaderCompile.h.

void RV_VKShader::unloadBoundTextures ( RE_Render r)
inlineoverridevirtual

Implements RE_Shader.

Definition at line 326 of file RV_VKShaderCompile.h.

bool RV_VKShader::validateShader ( RE_Render r,
UT_String messages = nullptr 
)
inlineoverridevirtual

Ensures that the shader can run given the current GL state. This mostly deals with texture bindings matching what is expected by the shader. If this returns false, the shader will not run, and 'messages' can be used to fetch the reason.

Reimplemented from RE_Shader.

Definition at line 189 of file RV_VKShaderCompile.h.


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