summaryrefslogtreecommitdiffstats
path: root/progs/slang/framework.h
diff options
context:
space:
mode:
Diffstat (limited to 'progs/slang/framework.h')
-rw-r--r--progs/slang/framework.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/progs/slang/framework.h b/progs/slang/framework.h
new file mode 100644
index 00000000000..fe1c4cbd383
--- /dev/null
+++ b/progs/slang/framework.h
@@ -0,0 +1,79 @@
+#ifndef _FRAMEWORK_H_
+#define _FRAMEWORK_H_
+
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <GL/gl.h>
+#include <GL/glut.h>
+#include <GL/glext.h>
+
+#ifdef WIN32
+#define GETPROCADDRESS(x) wglGetProcAddress (x)
+#else
+#define GETPROCADDRESS(x) glutGetProcAddress (x)
+#endif
+
+#define GETPROCADDR(x,T) do { x = (T) (GETPROCADDRESS(#x)); assert (x != NULL); } while (0)
+
+/*
+ * GL_ARB_multitexture
+ */
+extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
+extern PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB;
+
+/*
+ * GL_ARB_shader_objects
+ */
+extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
+extern PFNGLGETHANDLEARBPROC glGetHandleARB;
+extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
+extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
+extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
+extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
+extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
+extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
+extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
+extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
+extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
+extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
+extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
+/*static PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL;*/
+
+/*
+ * GL_ARB_vertex_shader
+ */
+extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
+extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
+extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
+extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
+extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
+extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
+
+/*
+ * GL_EXT_fog_coord
+ */
+extern PFNGLFOGCOORDFVEXTPROC glFogCoordfvEXT;
+extern PFNGLFOGCOORDPOINTEREXTPROC glFogCoordPointerEXT;
+
+/*
+ * GL_EXT_secondary_color
+ */
+extern PFNGLSECONDARYCOLOR3FVEXTPROC glSecondaryColor3fvEXT;
+extern PFNGLSECONDARYCOLORPOINTEREXTPROC glSecondaryColorPointerEXT;
+
+void InitFramework (int *argc, char *argv[]);
+
+extern void InitScene (void);
+extern void RenderScene (void);
+
+GLboolean CheckObjectStatus (GLhandleARB);
+
+#endif
+