summaryrefslogtreecommitdiff
path: root/graphics/asymptote/shaders.h
blob: 56b4560d6a72d2a7b644b986250ffe7d9ff3e1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#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);
#endif