|
From: Seb <whi...@us...> - 2004-09-27 19:34:19
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23481 Modified Files: d3map.cc gldefs.h texture.cc tgglext.cc tgglext.h vshader.h Log Message: Portage OSX Index: tgglext.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgglext.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tgglext.cc 26 Sep 2004 13:15:34 -0000 1.1.1.1 --- tgglext.cc 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 39,42 **** --- 39,45 ---- #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); #endif + #ifdef TGOSX + #define GETARBPOINTER(var,type,name) var = (type)SDL_GL_GetProcAddress(name); + #endif Index: d3map.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/d3map.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** d3map.cc 27 Sep 2004 12:48:16 -0000 1.2 --- d3map.cc 27 Sep 2004 19:33:58 -0000 1.3 *************** *** 18,22 **** } ! getline (&buffer, &size, fp); Log ("%s", buffer); --- 18,22 ---- } ! //getline (&buffer, &size, fp); Log ("%s", buffer); *************** *** 41,45 **** ! } ! ! --- 41,43 ---- ! } \ No newline at end of file Index: tgglext.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/tgglext.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tgglext.h 26 Sep 2004 13:15:34 -0000 1.1.1.1 --- tgglext.h 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 4,13 **** #include "gldefs.h" //#define GL_GLEXT_PROTOTYPES - #include <GL/glext.h> //#undef GL_GLEXT_PROTOTYPES namespace tg { extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; --- 4,46 ---- #include "gldefs.h" //#define GL_GLEXT_PROTOTYPES //#undef GL_GLEXT_PROTOTYPES + #ifndef APIENTRY + #define APIENTRY + #endif + namespace tg { + typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); + typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); + + typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); + typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); + typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); + typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); + + typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC)(GLenum target, GLuint buffer); + typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC)(GLsizei n, const GLuint *buffers); + typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC)(GLsizei n, GLuint *buffers); + typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, int size, const GLvoid *data, GLenum usage); + + typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); + typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); + typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string); + typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + + typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); + typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); + typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); + typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); + typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); + + typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); + typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); + typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); + typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); + typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + extern PFNGLACTIVETEXTUREPROC _glActiveTextureARB; extern PFNGLMULTITEXCOORD3FARBPROC _glMultiTexCoord3fARB; *************** *** 39,42 **** --- 72,80 ---- extern PFNGLPROGRAMPARAMETER4FNVPROC _glProgramParameter4fNV; + #define GL_VERTEX_PROGRAM_NV 0x8620 + #define GL_PROGRAM_ERROR_POSITION_NV 0x864B + #define GL_IDENTITY_NV 0x862A + #define GL_MODELVIEW_PROJECTION_NV 0x8629 + void InitARBFunctions (); Index: texture.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/texture.cc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** texture.cc 26 Sep 2004 13:15:16 -0000 1.1.1.1 --- texture.cc 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 2,7 **** #include <stdlib.h> //TODO: remove ! #include "GL/gl.h" ! #include "GL/glu.h" #include "engine.h" --- 2,12 ---- #include <stdlib.h> //TODO: remove ! #if defined (TGOSX) ! #include <OpenGL/gl.h> ! #include <OpenGL/glu.h> ! #else ! #include <GL/gl.h> ! #include <GL/glu.h> ! #endif #include "engine.h" Index: vshader.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/vshader.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vshader.h 27 Sep 2004 12:48:16 -0000 1.2 --- vshader.h 27 Sep 2004 19:33:58 -0000 1.3 *************** *** 1,29 **** ! #ifndef _TGVSHADER_H ! #define _TGVSHADER_H ! ! #include "gldefs.h" ! ! namespace tg ! { ! ! /** ! * Classe de gestion des vertex shaders ! */ ! class VShader ! { ! public: ! VShader(const char* name); ! void Enable (); ! void Disable (); ! void Bind (); ! void Bind (const float* value, ...); ! void SetParams(const float* value, ...); ! protected: ! GLhandleARB shader; ! }; ! ! } ! ! #endif ! ! --- 1,27 ---- ! #ifndef _TGVSHADER_H ! #define _TGVSHADER_H ! ! #include "gldefs.h" ! ! namespace tg ! { ! ! /** ! * Classe de gestion des vertex shaders ! */ ! class VShader ! { ! public: ! VShader(const char* name); ! void Enable (); ! void Disable (); ! void Bind (); ! void Bind (const float* value, ...); ! void SetParams(const float* value, ...); ! protected: ! //GLhandleARB shader; ! }; ! ! } ! ! #endif \ No newline at end of file Index: gldefs.h =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/gldefs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gldefs.h 26 Sep 2004 13:15:23 -0000 1.1.1.1 --- gldefs.h 27 Sep 2004 19:33:58 -0000 1.2 *************** *** 2,9 **** #define _TGGLDEFS_H #include <GL/gl.h> #include <GL/glu.h> - #include <SDL/SDL.h> #include <GL/glext.h> #define TG_CUBEMAP GL_TEXTURE1 --- 2,16 ---- #define _TGGLDEFS_H + #if defined (TGOSX) + #include <OpenGL/gl.h> + #include <OpenGL/glu.h> + #include <OpenGL/glext.h> + #else #include <GL/gl.h> #include <GL/glu.h> #include <GL/glext.h> + #endif + + #include <SDL.h> #define TG_CUBEMAP GL_TEXTURE1 |