Inviwo  0.9.10.1
Inviwo documentation
inviwo::utilgl Namespace Reference

Classes

struct  Activate
 
struct  BlendModeEquationState
 RAII object for OpenGL blend equation. More...
 
struct  BlendModeState
 RAII object for OpenGL blending and blend mode, enables blending if source mode is different from GL_NONE. More...
 
struct  ClearColor
 RAII object for OpenGL clear color used when calling glClear(GL_COLOR_BUFFER_BIT) More...
 
struct  ClearDepth
 
struct  ColorMask
 representation of the OpenGL color write mask More...
 
struct  ColorMaski
 representation of the OpenGL color write mask of a specific buffer More...
 
struct  ColorMaskiState
 RAII object for OpenGL color mask state, sets the color mask for a specific draw buffer. More...
 
struct  ColorMaskState
 RAII object for OpenGL color mask state, sets the color mask for all draw buffers. More...
 
struct  CullFaceState
 RAII object for OpenGL cull face state, which enables GL_CULL_FACE if mode is different from GL_NONE. More...
 
struct  dependent_false
 
struct  Enable
 
struct  GlBoolState
 RAII object for OpenGL bool states. More...
 
struct  PolygonModeState
 
struct  ScissorBox
 representation of an OpenGL viewport with setter and getter More...
 
struct  ScissorState
 RAII object for OpenGL scissor state. More...
 
struct  SimpleState
 
struct  TexEnv
 RAII object for texture environments of a texture bound to a given texture unit. More...
 
struct  TexParameter
 RAII object for texture parameters of a texture bound to a given texture unit. More...
 
struct  UniformSetter
 
struct  UniformSetter< bool >
 
struct  UniformSetter< BoolProperty >
 
struct  UniformSetter< bvec2 >
 
struct  UniformSetter< bvec3 >
 
struct  UniformSetter< bvec4 >
 
struct  UniformSetter< GLfloat >
 
struct  UniformSetter< GLint >
 
struct  UniformSetter< GLuint >
 
struct  UniformSetter< ivec2 >
 
struct  UniformSetter< ivec3 >
 
struct  UniformSetter< ivec4 >
 
struct  UniformSetter< mat2 >
 
struct  UniformSetter< mat3 >
 
struct  UniformSetter< mat4 >
 
struct  UniformSetter< OrdinalProperty< T > >
 
struct  UniformSetter< std::array< bool, N > >
 
struct  UniformSetter< std::array< T, N > >
 
struct  UniformSetter< std::vector< T > >
 
struct  UniformSetter< TextureUnit >
 
struct  UniformSetter< uvec2 >
 
struct  UniformSetter< uvec3 >
 
struct  UniformSetter< uvec4 >
 
struct  UniformSetter< vec2 >
 
struct  UniformSetter< vec3 >
 
struct  UniformSetter< vec4 >
 
struct  Viewport
 representation of an OpenGL viewport with setter and getter More...
 
struct  ViewportState
 

Typedefs

using DepthFuncState = SimpleState< GLint, GLenum, GL_DEPTH_FUNC, glGetIntegerv, glDepthFunc >
 
using DepthMaskState = SimpleState< GLboolean, GLboolean, GL_DEPTH_WRITEMASK, glGetBooleanv, glDepthMask >
 
using LineWidthState = SimpleState< GLfloat, GLfloat, GL_LINE_WIDTH, glGetFloatv, glLineWidth, validateLineWidth >
 
using PointSizeState = SimpleState< GLfloat, GLfloat, GL_POINT_SIZE, glGetFloatv, glPointSize >
 

Functions

IVW_MODULE_OPENGL_API void GLAPIENTRY openGLDebugMessageCallback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *none)
 
IVW_MODULE_OPENGL_API void handleOpenGLDebugModeChange (debug::Mode mode, debug::Severity severity)
 
IVW_MODULE_OPENGL_API void handleOpenGLDebugMode (Canvas::ContextID context)
 
IVW_MODULE_OPENGL_API void setOpenGLDebugMode (debug::Mode mode, debug::Severity severity)
 
IVW_MODULE_OPENGL_API void handleOpenGLDebugMessagesChange (utilgl::debug::Severity severity)
 
IVW_MODULE_OPENGL_API void configureOpenGLDebugMessages (utilgl::debug::Severity severity)
 
std::array< GLint, 4 > IVW_MODULE_OPENGL_API convertSwizzleMaskToGL (const SwizzleMask &mask)
 
SwizzleMask IVW_MODULE_OPENGL_API convertSwizzleMaskFromGL (const std::array< GLint, 4 > &maskGL)
 
bool IVW_MODULE_OPENGL_API operator== (const Viewport &a, const Viewport &b)
 
bool IVW_MODULE_OPENGL_API operator!= (const Viewport &lhs, const Viewport &rhs)
 
bool IVW_MODULE_OPENGL_API operator== (const ScissorBox &a, const ScissorBox &b)
 
bool IVW_MODULE_OPENGL_API operator!= (const ScissorBox &lhs, const ScissorBox &rhs)
 
bool IVW_MODULE_OPENGL_API operator== (const ColorMask &a, const ColorMask &b)
 
bool IVW_MODULE_OPENGL_API operator!= (const ColorMask &lhs, const ColorMask &rhs)
 
bool IVW_MODULE_OPENGL_API operator== (const ColorMaski &a, const ColorMaski &b)
 
bool IVW_MODULE_OPENGL_API operator!= (const ColorMaski &lhs, const ColorMaski &rhs)
 
template<typename T >
passThrough (T x)
 
IVW_MODULE_OPENGL_API GLfloat validateLineWidth (GLfloat width)
 
template<typename T >
void setShaderUniforms (Shader &shader, const TemplateProperty< T > &property, std::string name)
 
template<typename T >
void setShaderUniforms (Shader &shader, const TemplateProperty< T > &property)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const SimpleLightingProperty &property)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const ShadingMode::Modes &mode)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const SimpleLightingProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const CameraProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const CameraProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const Camera &property, std::string name)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const RaycastingProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const RaycastingProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const RaycastingProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void setShaderDefines (Shader &shader, const TemplateOptionProperty< RaycastingProperty::GradientComputation > &property, bool voxelClassification=false)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const SpatialEntity< 3 > &object, const std::string &name)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const SimpleRaycastingProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const SimpleRaycastingProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const SimpleRaycastingProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const IsoValueProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const IsoValueProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const IsoValueProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const IsoTFProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const IsoTFProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const IsoTFProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void addShaderDefinesBGPort (Shader &shader, const ImageInport &port)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const VolumeIndicatorProperty &property)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const VolumeIndicatorProperty &property, std::string name)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const StipplingProperty &property)
 
IVW_MODULE_OPENGL_API void addShaderDefines (Shader &shader, const StipplingProperty::Mode &mode)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const StipplingProperty &property, std::string name)
 
template<typename T >
void setShaderUniforms (Shader &shader, const OrdinalProperty< T > &property, std::string name)
 
template<typename T >
void setShaderUniforms (Shader &shader, const TemplateOptionProperty< T > &property, std::string name)
 
template<typename T >
void setShaderUniforms (Shader &shader, const MinMaxProperty< T > &property, std::string name)
 
template<typename T , typename std::enable_if< std::is_base_of< Property, T >::value, int >::type = 0>
void addDefines (Shader &shader, const T &property)
 
template<typename T , typename... Ts>
void addDefines (Shader &shader, const T &elem, const Ts &... elements)
 
template<typename T , typename std::enable_if< std::is_base_of< Property, T >::value, int >::type = 0>
void setUniforms (Shader &shader, const T &property)
 
template<typename T , typename... Ts>
void setUniforms (Shader &shader, const T &elem, const Ts &... elements)
 
IVW_MODULE_OPENGL_API int getLogLineNumber (const std::string &compileLogLine)
 
IVW_MODULE_OPENGL_API std::string getShaderInfoLog (GLuint id)
 
IVW_MODULE_OPENGL_API std::string getProgramInfoLog (GLuint id)
 
IVW_MODULE_OPENGL_API std::shared_ptr< const ShaderResourcefindShaderResource (const std::string &fileName)
 
IVW_MODULE_OPENGL_API std::vector< std::pair< ShaderType, std::shared_ptr< const ShaderResource > > > toShaderResources (const std::vector< std::pair< ShaderType, std::string >> &items)
 
IVW_MODULE_OPENGL_API std::string getGLSLTypeName (const DataFormatBase *format)
 
IVW_MODULE_OPENGL_API std::pair< ShaderType, std::shared_ptr< const ShaderResource > > imgIdentityVert ()
 
IVW_MODULE_OPENGL_API std::pair< ShaderType, std::shared_ptr< const ShaderResource > > imgQuadVert ()
 
IVW_MODULE_OPENGL_API std::pair< ShaderType, std::shared_ptr< const ShaderResource > > imgQuadFrag ()
 
IVW_MODULE_OPENGL_API void activateTarget (Image &targetImage, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateTarget (ImageOutport &targetOutport, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateAndClearTarget (Image &targetImage, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateAndClearTarget (ImageOutport &targetOutport, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateTargetAndCopySource (Image &targetImage, const Image &sourceImage, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateTargetAndCopySource (Image &targetImage, const ImageInport &sourceInport, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateTargetAndCopySource (ImageOutport &targetOutport, const ImageInport &sourceInport, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateTargetAndClearOrCopySource (Image &targetImage, const ImageInport &sourceInport, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void activateTargetAndClearOrCopySource (ImageOutport &targetOutport, const ImageInport &sourceInport, ImageType type=ImageType::AllLayers)
 
IVW_MODULE_OPENGL_API void clearCurrentTarget ()
 
IVW_MODULE_OPENGL_API void deactivateCurrentTarget ()
 
IVW_MODULE_OPENGL_API void updateAndActivateTarget (ImageOutport &targetOutport, ImageInport &sourceInport)
 
IVW_MODULE_OPENGL_API void bindTextures (const Image &image, bool color, bool depth, bool picking, GLenum colorTexUnit, GLenum depthTexUnit, GLenum pickingTexUnit)
 
IVW_MODULE_OPENGL_API void bindColorTexture (const Image &image, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindColorTexture (const ImageInport &inport, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindColorTexture (const ImageOutport &outport, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindDepthTexture (const Image &image, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindDepthTexture (const ImageInport &inport, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindDepthTexture (const ImageOutport &outport, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindPickingTexture (const Image &image, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindPickingTexture (const ImageInport &inport, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindPickingTexture (const ImageOutport &outport, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const Image &image, GLenum colorTexUnit, GLenum depthTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageInport &inport, GLenum colorTexUnit, GLenum depthTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageOutport &outport, GLenum colorTexUnit, GLenum depthTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const Image &image, GLenum colorTexUnit, GLenum depthTexUnit, GLenum pickingTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageInport &inport, GLenum colorTexUnit, GLenum depthTexUnit, GLenum pickingTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageOutport &outport, GLenum colorTexUnit, GLenum depthTexUnit, GLenum pickingTexUnit)
 
IVW_MODULE_OPENGL_API void bindColorTexture (const Image &image, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindColorTexture (const ImageInport &inport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindColorTexture (const ImageOutport &outport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindDepthTexture (const Image &image, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindDepthTexture (const ImageInport &inport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindDepthTexture (const ImageOutport &outport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindPickingTexture (const Image &image, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindPickingTexture (const ImageInport &inport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindPickingTexture (const ImageOutport &outport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const Image &image, const TextureUnit &colorTexUnit, const TextureUnit &depthTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageInport &inport, const TextureUnit &colorTexUnit, const TextureUnit &depthTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageOutport &outport, const TextureUnit &colorTexUnit, const TextureUnit &depthTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const Image &image, const TextureUnit &colorTexUnit, const TextureUnit &depthTexUnit, const TextureUnit &pickingTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageInport &inport, const TextureUnit &colorTexUnit, const TextureUnit &depthTexUnit, const TextureUnit &pickingTexUnit)
 
IVW_MODULE_OPENGL_API void bindTextures (const ImageOutport &outport, const TextureUnit &colorTexUnit, const TextureUnit &depthTexUnit, const TextureUnit &pickingTexUnit)
 
IVW_MODULE_OPENGL_API void unbindTextures (const Image &image, bool color, bool depth, bool picking)
 
IVW_MODULE_OPENGL_API void unbindColorTexture (const ImageInport &inport)
 
IVW_MODULE_OPENGL_API void unbindColorTexture (const ImageOutport &outport)
 
IVW_MODULE_OPENGL_API void unbindDepthTexture (const ImageInport &inport)
 
IVW_MODULE_OPENGL_API void unbindDepthTexture (const ImageOutport &outport)
 
IVW_MODULE_OPENGL_API void unbindPickingTexture (const ImageInport &inport)
 
IVW_MODULE_OPENGL_API void unbindPickingTexture (const ImageOutport &outport)
 
IVW_MODULE_OPENGL_API void unbindTextures (const Image &image)
 
IVW_MODULE_OPENGL_API void unbindTextures (const ImageInport &inport)
 
IVW_MODULE_OPENGL_API void unbindTextures (const ImageOutport &outport)
 
IVW_MODULE_OPENGL_API void bindTexture (const Texture &texture, GLenum texUnit)
 
IVW_MODULE_OPENGL_API void bindTexture (const Texture &texture, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, const Texture &texture, const std::string samplerID)
 
IVW_MODULE_OPENGL_API void bindTexture (const TransferFunctionProperty &tf, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, const TransferFunctionProperty &tf)
 
IVW_MODULE_OPENGL_API void bindTexture (const IsoTFProperty &property, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, const IsoTFProperty &property)
 
IVW_MODULE_OPENGL_API void bindTexture (const Volume &volume, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void bindTexture (const VolumeInport &inport, const TextureUnit &texUnit)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const Image &image, const std::string samplerID)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const ImageInport &inport, const std::string samplerID="")
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const ImageOutport &outport, const std::string samplerID="")
 
IVW_MODULE_OPENGL_API std::unique_ptr< MeshplaneRect ()
 
IVW_MODULE_OPENGL_API void singleDrawImagePlaneRect ()
 
IVW_MODULE_OPENGL_API void multiDrawImagePlaneRect (int instances)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, const Image &image, const std::string &id, ImageType type)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, ImageInport &image, ImageType type)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, ImageOutport &image, ImageType type)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const Volume &volume, const std::string &samplerID)
 
IVW_MODULE_OPENGL_API void setShaderUniforms (Shader &shader, const VolumeInport &port, const std::string &samplerID)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, VolumeInport &volume)
 
IVW_MODULE_OPENGL_API void bindAndSetUniforms (Shader &shader, TextureUnitContainer &cont, const Volume &volume, const std::string &samplerID)
 
void logDebugMode (debug::Mode mode, debug::Severity severity, Canvas::ContextID context)
 

Detailed Description

utilgl

Function Documentation

◆ imgIdentityVert()

std::pair< ShaderType, std::shared_ptr< const ShaderResource > > inviwo::utilgl::imgIdentityVert ( )

Standard minimal vertex shader resource, used if no vertex shader exits in shader.h

◆ imgQuadFrag()

std::pair< ShaderType, std::shared_ptr< const ShaderResource > > inviwo::utilgl::imgQuadFrag ( )

Standard vertex shader resource for a quad

◆ imgQuadVert()

std::pair< ShaderType, std::shared_ptr< const ShaderResource > > inviwo::utilgl::imgQuadVert ( )

Standard vertex shader resource for a quad

◆ planeRect()

std::unique_ptr< Mesh > inviwo::utilgl::planeRect ( )

Creates an indexed triangle strip mesh with points and texture coordinates. (-1,1)-—(1, 1) | | (-1,1)-—(1,-1)

Returns
std::unique_ptr<Mesh>