summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/shaders.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/utils/asymptote/shaders.h
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/shaders.h')
-rw-r--r--Build/source/utils/asymptote/shaders.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/shaders.h b/Build/source/utils/asymptote/shaders.h
new file mode 100644
index 00000000000..be2441a66bc
--- /dev/null
+++ b/Build/source/utils/asymptote/shaders.h
@@ -0,0 +1,37 @@
+#ifndef __TOGL_SHADERSPROC
+#define __TOGL_SHADERSPROC
+
+#define GLEW_NO_GLU
+
+#ifdef __MSDOS__
+#define GLEW_STATIC
+#define _WIN32
+#endif
+
+#include "GL/glew.h"
+
+#ifdef __MSDOS__
+#undef _WIN32
+#include <GL/wglew.h>
+#include <GL/wglext.h>
+#endif
+
+#include <string>
+
+typedef std::pair<std::string, int> ShaderfileModePair;
+
+GLuint compileAndLinkShader(
+ std::vector<ShaderfileModePair> const& shaders, size_t NLights,
+ size_t NMaterials, std::vector<std::string> const& defineflags);
+
+GLuint createShaders(GLchar const *src, int shaderType,
+ std::string const& filename);
+
+GLuint createShaderFile(std::string file, int shaderType, size_t Nlights,
+ size_t Nmaterials,
+ std::vector<std::string> const& constflags);
+
+enum attrib {positionAttrib=0,normalAttrib,materialAttrib,colorAttrib,
+ widthAttrib};
+
+#endif