1#include <Corrade/Utility/Resource.h>
2#include <Magnum/GL/AbstractShaderProgram.h>
3#include <Magnum/GL/Shader.h>
4#include <Magnum/GL/Texture.h>
5#include <Magnum/GL/Version.h>
21 Utility::Resource rs(
"data");
23 GL::Shader vertShader{GL::Version::GL460, GL::Shader::Type::Vertex};
24 GL::Shader fragShader{GL::Version::GL460, GL::Shader::Type::Fragment};
25 vertShader.addSource(rs.getString(
"ChemStructureShader.vert"));
26 fragShader.addSource(rs.getString(
"ChemStructureShader.frag"));
28 CORRADE_INTERNAL_ASSERT_OUTPUT(vertShader.compile());
29 CORRADE_INTERNAL_ASSERT_OUTPUT(fragShader.compile());
31 this->attachShaders({vertShader, fragShader});
32 CORRADE_INTERNAL_ASSERT(this->link());
A class representing the shader responsible for the rasterization of the internal structure of the mo...
Definition ChemStructureShader.h:10
ChemStructureShader()
Loads the shader files from disk, then compiles and links them.
Definition ChemStructureShader.h:20
void setModelViewMatrix(const Matrix4 &matrix)
Update the model view matrix uniform of this shader.
Definition ChemStructureShader.h:49
@ MaskOutput
Definition ChemStructureShader.h:16
@ PosOutput
Definition ChemStructureShader.h:15
@ ColorOutput
Definition ChemStructureShader.h:14
void setViewMatrix(const Matrix4 &matrix)
Update the view matrix uniform of this shader.
Definition ChemStructureShader.h:61
@ TextureUnit
Definition ChemStructureShader.h:72
Int modelViewMatrixUniform
Definition ChemStructureShader.h:75
void setProjectionMatrix(const Matrix4 &matrix)
Update the projection matrix uniform of this shader.
Definition ChemStructureShader.h:55
Int projectionMatrixUniform
Definition ChemStructureShader.h:77
void setModelMatrix(const Matrix4 &matrix)
Update the model matrix uniform of this shader.
Definition ChemStructureShader.h:43
Int modelMatrixUniform
Definition ChemStructureShader.h:74
Int viewMatrixUniform
Definition ChemStructureShader.h:76