The Vish Visualization Shell 0.3
Vish
Public Types | Public Member Functions | Public Attributes | List of all members
Wizt::Programmable::ShaderPrefix Struct Reference

Public Types

enum  ExtensionBehavior { enable , require , warn , disable }
 https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)#Extensions More...
 

Public Member Functions

bool fillSources (std::vector< std::string > &Sources) const
 Fill the first elements of the given Sources with the shader prefixes as computed from the current prefix settings.
 
size_t getNumberOfSources () const
 Get the number of sources that the current prefix settings will need.
 
void setExtensionBehavior (const glsl &Ext, const ExtensionBehavior=enable)
 Generates a string of the kind.
 

Public Attributes

std::list< glsl > extensions
 GLSL extension settings.
 
std::list< glsl > layouts
 Layout specifications.
 
glsl version
 GLSL version string.
 

Member Enumeration Documentation

◆ ExtensionBehavior

https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)#Extensions

Enumerator
enable 

Causes the named extension to work; if the implementation does not support the extension, it only gives a warning.

Fails if used with all.

require 

Causes the named extension to work; if the implementation does not support the extension, it fails.

It also fails if used with all.

warn 

Causes the named extension to work; however, using the extension will emit warnings.

If used with all, then the use of any extensions will emit warnings.

disable 

Prevents the named extension from working at all.

Thus, any use of it will be seen as undefined syntax and cause an error. If used with all, then this prevents any extensions from working.

Member Function Documentation

◆ fillSources()

bool Wizt::Programmable::ShaderPrefix::fillSources ( std::vector< std::string > &  Sources) const

Fill the first elements of the given Sources with the shader prefixes as computed from the current prefix settings.

Returns
false if there size of the Sources vector is smaller than getNumberOfSources().

◆ setExtensionBehavior()

void Wizt::Programmable::ShaderPrefix::setExtensionBehavior ( const glsl &  Ext,
const ExtensionBehavior  E = enable 
)

Generates a string of the kind.

#extension Extension : enable

and places it into the extensions list.

Member Data Documentation

◆ version

glsl Wizt::Programmable::ShaderPrefix::version

GLSL version string.

Always comes first.