add drawPoint/drawLine (both slow) and drawPoints (faster) to GLInstancingRenderer, with GLSL shaders
This commit is contained in:
10
btgui/OpenGLWindow/Shaders/linesPS.glsl
Normal file
10
btgui/OpenGLWindow/Shaders/linesPS.glsl
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
#version 150
|
||||
|
||||
in vec4 colourV;
|
||||
out vec4 fragColour;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
fragColour = colourV;
|
||||
}
|
||||
10
btgui/OpenGLWindow/Shaders/linesPS.h
Normal file
10
btgui/OpenGLWindow/Shaders/linesPS.h
Normal file
@@ -0,0 +1,10 @@
|
||||
//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project
|
||||
static const char* linesFragmentShader= \
|
||||
"#version 150\n"
|
||||
"in vec4 colourV;\n"
|
||||
"out vec4 fragColour;\n"
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" fragColour = colourV;\n"
|
||||
"}\n"
|
||||
;
|
||||
17
btgui/OpenGLWindow/Shaders/linesVS.glsl
Normal file
17
btgui/OpenGLWindow/Shaders/linesVS.glsl
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 150
|
||||
|
||||
uniform mat4 ModelViewMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform vec4 colour;
|
||||
|
||||
in vec4 position;
|
||||
|
||||
|
||||
out vec4 colourV;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
colourV = colour;
|
||||
gl_Position = ProjectionMatrix * ModelViewMatrix * position;
|
||||
|
||||
}
|
||||
15
btgui/OpenGLWindow/Shaders/linesVS.h
Normal file
15
btgui/OpenGLWindow/Shaders/linesVS.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project
|
||||
static const char* linesVertexShader= \
|
||||
"#version 150 \n"
|
||||
"uniform mat4 ModelViewMatrix;\n"
|
||||
"uniform mat4 ProjectionMatrix;\n"
|
||||
"uniform vec4 colour;\n"
|
||||
"in vec4 position;\n"
|
||||
"out vec4 colourV;\n"
|
||||
"void main (void)\n"
|
||||
"{\n"
|
||||
" colourV = colour;\n"
|
||||
" gl_Position = ProjectionMatrix * ModelViewMatrix * position;\n"
|
||||
" \n"
|
||||
"}\n"
|
||||
;
|
||||
Reference in New Issue
Block a user