wahrhaft avatar wahrhaft committed 0fbd394

linux fixes

Comments (0)

Files changed (8)

 #include "Util.h"
 #include "Debugger.h"
 #include <stdio.h>
-#include "gfx1.3.h"
+#include "Gfx1.3.h"
 #ifndef _WIN32
 #include <stdarg.h>
 #include <string.h>
 #include "m64p_config.h"
 #include "m64p_vidext.h"
 #include "Ini.h"
-#include "gfx1.3.h"
+#include "Gfx1.3.h"
 #include <limits.h>
 #ifndef _WIN32
 #include <unistd.h>
   // bswap on a dword (32 bits) boundry
 }
 
-#ifdef PERFORMANCE
+#ifndef WIN32
 BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER counter)
 {
    struct timeval tv;

src/wrapper/2xsai.cpp

  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-#include "../gfx1.3.h"
+#include "../Gfx1.3.h"
 
 static __inline int GetResult( DWORD A, DWORD B, DWORD C, DWORD D )
 {

src/wrapper/combiner.cpp

 #include <string.h>
 #endif
 
-#include <SDL_opengl.h>
-
 #include "glide.h"
 #include "main.h"
 #include "m64p.h"

src/wrapper/geometry.cpp

 
 #include <stdio.h>
 
-#include <SDL_opengl.h>
-
 #include "glide.h"
 #include "main.h"
 

src/wrapper/main.cpp

 #include <string.h>
 
 #include <SDL.h>
-#include <SDL_opengl.h>
 
 #include "glide.h"
 #include "main.h"
 extern int getEnableFBO();
 extern int getDisableAuxbuf();
 
+#ifdef WIN32
 PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
 PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
 PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
     INIT_ENTRY_POINT(PFNGLUNIFORM4FARBPROC, glUniform4fARB);
     INIT_ENTRY_POINT(PFNGLUSEPROGRAMOBJECTARBPROC, glUseProgramObjectARB);
 }
-
+#else
+static void InitGLPrototypes() { return; }
+#endif
 
 int screen_width, screen_height;
 

src/wrapper/main.h

 #ifndef MAIN_H
 #define MAIN_H
 
+#ifdef WIN32
+    extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
+    extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
+    extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
+    extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
+    extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT;
+    extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
+    extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
+    extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
+    extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
+    extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
+    extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
+    extern PFNGLFOGCOORDFEXTPROC glFogCoordfEXT;
+    extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
+    extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
+    extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
+    extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
+    extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
+    extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
+    extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
+    extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
+    extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
+    extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
+    extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
+    extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
+    extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
+    extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
+    extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
+    extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
+#else
+    #define GL_GLEXT_PROTOTYPES
+#endif
 #include <SDL_opengl.h>
 
 #include "../winlnxdefs.h"
 
-extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
-extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
-extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
-extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
-extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT;
-extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
-extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
-extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
-extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
-extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
-extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
-extern PFNGLFOGCOORDFEXTPROC glFogCoordfEXT;
-extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
-extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
-extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
-extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
-extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
-extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
-extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
-extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
-extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
-extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
-extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
-extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
-extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
-extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
-extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
-extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
 
 #ifdef VPDEBUG
 void dump_tex(int id);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.