FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
VectorAsColors.hpp
1#ifndef __VECTORS_AS_COLORS_HPP
2#define __VECTORS_AS_COLORS_HPP
3
4#include <ocean/Anemonia/Programmable.hpp>
5#include <ocean/Anemonia/Seagrass.hpp>
6
7#include "shadersDllApi.h"
8
9namespace Wizt
10{
11
18{
19 typedef Eagle::PhysicalSpace::tvector InputType;
20
21 const string VectorFieldAttributeName;
22
24 : VectorFieldAttributeName( "VectorFieldValue" )
25 {}
26
28
29 bool initializeAnemone(Anemone&RenderAnemone,
31 const AnemoneCreator<>&AC) const
32 {
33 return true;
34 }
35
36
39 {
40 return
41"\n"
42"attribute vec3 VectorFieldValue;"
43
44"varying out vec3 tVector;\n"
45
46"void main(void)\n"
47"{\n"
48" gl_Position = ftransform();\n"
49" tVector = VectorFieldValue;\n"
50""
51"\n"
52"}\n";
53 }
54
57 {
58 return
59R"FRAGMENTSHADER(
60
61varying in vec3 tVector;
62
63void main(void)
64{
65
66#ifndef HAVE_VectorFieldValue
67 discard;
68#endif
69
70 gl_FragColor = vec4(tVector, .5);
71}
72
73)FRAGMENTSHADER"
74
75 ;
76 }
77
78 string getShaderAttributeName() const
79 {
80 return VectorFieldAttributeName;
81 }
82};
83
84
85} // namespace Wizt
86
87#endif // __VECTORS_AS_COLORS_HPP
basic_string< char > string
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
A minimalistic geometry shader that displays a vector field as RGB colors.
Definition VectorAsColors.hpp:18
std::string vertex_shader(VRenderContext &Context) const override
Vertexshader GLGS code.
Definition VectorAsColors.hpp:38
std::string fragment_shader(VRenderContext &Context) const override
Fragmentshader GLGS code that might stem from an text file.
Definition VectorAsColors.hpp:56