summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/shaders.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-02 16:31:31 +0000
committerKarl Berry <karl@freefriends.org>2021-01-02 16:31:31 +0000
commit6457cd3f6e21e23e21db6dafff021d17f5457567 (patch)
tree08f169333e47c5fc1c50e828cf3a0f50bdf9b508 /Build/source/utils/asymptote/shaders.cc
parentdc2504a4c02af0ec2fff00e6b833c6143a06b4cd (diff)
asy 2.68 sources
git-svn-id: svn://tug.org/texlive/trunk@57291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/shaders.cc')
-rw-r--r--Build/source/utils/asymptote/shaders.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/Build/source/utils/asymptote/shaders.cc b/Build/source/utils/asymptote/shaders.cc
index ab0c194917f..a9c038c2299 100644
--- a/Build/source/utils/asymptote/shaders.cc
+++ b/Build/source/utils/asymptote/shaders.cc
@@ -13,7 +13,7 @@
#include "shaders.h"
-GLuint compileAndLinkShader(std::vector<ShaderfileModePair> const& shaders,
+GLuint compileAndLinkShader(std::vector<ShaderfileModePair> const& shaders,
size_t Nlights, size_t NMaterials,
std::vector<std::string> const& defineflags)
{
@@ -33,7 +33,7 @@ GLuint compileAndLinkShader(std::vector<ShaderfileModePair> const& shaders,
glBindAttribLocation(shader,materialAttrib,"material");
glBindAttribLocation(shader,colorAttrib,"color");
glBindAttribLocation(shader,widthAttrib,"width");
-
+
glLinkProgram(shader);
for(size_t i=0; i < n; ++i) {
@@ -50,12 +50,12 @@ GLuint createShaders(GLchar const* src, int shaderType,
GLuint shader=glCreateShader(shaderType);
glShaderSource(shader, 1, &src, NULL);
glCompileShader(shader);
-
+
GLint status;
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
if(status != GL_TRUE) {
- GLint length;
+ GLint length;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
@@ -70,7 +70,7 @@ GLuint createShaders(GLchar const* src, int shaderType,
std::cerr << std::endl << "GL Compile error" << std::endl;
std::cerr << src << std::endl;
- throw 1;
+ throw 1;
}
return shader;
}
@@ -88,7 +88,7 @@ GLuint createShaderFile(std::string file, int shaderType, size_t Nlights,
#else
#define GLSL_VERSION "130"
#endif
-
+
shaderSrc << "#version " << GLSL_VERSION << "\n";
shaderSrc << "#extension GL_ARB_uniform_buffer_object : enable"
<< "\n";