temp commit
[SARndbox.git] / ShaderHelper.h
blob1090d033b31253097c2a4930c13cf2bd305b832b
1 /***********************************************************************
2 ShaderHelper - Helper functions to create GLSL shaders from text files.
3 Copyright (c) 2014 Oliver Kreylos
5 This file is part of the Augmented Reality Sandbox (SARndbox).
7 The Augmented Reality Sandbox is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 The Augmented Reality Sandbox is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with the Augmented Reality Sandbox; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 ***********************************************************************/
22 #ifndef SHADERHELPER_INCLUDED
23 #define SHADERHELPER_INCLUDED
25 #include <GL/gl.h>
26 #include <GL/Extensions/GLARBShaderObjects.h>
28 GLhandleARB compileVertexShader(const char*
29 vertexShaderFileName); // Returns a handle to a vertex shader compiled from the given source file in the SARndbox's shader directory
30 GLhandleARB compileFragmentShader(const char*
31 fragmentShaderFileName); // Returns a handle to a fragment shader compiled from the given source file in the SARndbox's shader directory
32 GLhandleARB linkVertexAndFragmentShader(const char*
33 shaderFileName); // Returns a handle to a shader program linked from a vertex shader and a fragment shader compiled from the given source files in the SARndbox's shader directory
35 #endif