diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-10 16:06:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-10 16:06:35 +0000 |
commit | bbb53f06c6f48d4c675d250829032e09f4065a86 (patch) | |
tree | 0583c905a5d67f3e1447456048b2e479311e4e83 /Build/source/utils/asymptote/shaders.h | |
parent | efd1dbbaa1332a9534c25024a0c295f423714851 (diff) |
asy 2.52 sources
git-svn-id: svn://tug.org/texlive/trunk@51856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/shaders.h')
-rw-r--r-- | Build/source/utils/asymptote/shaders.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/Build/source/utils/asymptote/shaders.h b/Build/source/utils/asymptote/shaders.h index 0c261ffc315..f92b7010ab2 100644 --- a/Build/source/utils/asymptote/shaders.h +++ b/Build/source/utils/asymptote/shaders.h @@ -1,24 +1,34 @@ #ifndef __TOGL_SHADERSPROC #define __TOGL_SHADERSPROC -#define GLEW_STATIC #define GLEW_NO_GLU -#ifdef __APPLE__ -#include <OpenGL/glew.h> -#else -#include <GL/glew.h> #ifdef __MSDOS__ -#include<windows.h> -#include <GL/wglew.h> -#include <GL/wglext.h> +#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> -#include <unordered_set> -GLuint createShaders(GLchar const *src, int shaderType); +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, bool explicitcolor=false); + size_t Nmaterials, + std::vector<std::string> const& constflags); #endif |