Commits

Jason McKesson committed b5c722f

CaseCmp now only redefined for _MSC_VER.

  • Participants
  • Parent commits 5357d23
  • Branches 0.2

Comments (0)

Files changed (5)

data/gl_specloaderfunc.lua

 
 #if defined(_WIN32)
 
+#ifdef _MSC_VER
 #pragma warning(disable: 4055)
 #pragma warning(disable: 4054)
+#endif
 
 static int TestPointer(const void *pTest)
 {

modules/StylePointerC.lua

 	hFile:writeblock([[
 #include <stdlib.h>
 #include <string.h>
-#ifdef WIN32
+#ifdef _MSC_VER
 #define strcasecmp(lhs, rhs) _stricmp((lhs), (rhs))
 #endif
 ]])

modules/StylePointerCPP.lua

 #include <algorithm>
 #include <vector>
 #include <string.h>
-#ifdef WIN32
+#ifdef _MSC_VER
 #define strcasecmp(lhs, rhs) _stricmp((lhs), (rhs))
 #endif
 ]])

test/premake4.lua

 	UseLibs {"freeglut"}
 	
 	configuration "windows"
-		defines "WIN32"
+--		defines "WIN32"
 		links {"glu32", "opengl32", "gdi32", "winmm", "user32"}
 		
 	configuration "linux"
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "gl_test_cpp.hpp"
-#include "wgl_test_cpp.hpp"
+#include "gl_test.hpp"
+//#include "wgl_test.hpp"
 #include <GL/freeglut.h>
 
 GLuint positionBufferObject;
 
 	program = gl::CreateProgram();
 	gl::AttachShader(program, vertShader);
-	gl::AttachShader(program, fragShader);	
+	gl::AttachShader(program, fragShader);
 	gl::LinkProgram(program);
 
 	GLint status;
 
 //Called whenever a key on the keyboard was pressed.
 //The key is given by the ''key'' parameter, which is in ASCII.
-//It's often a good idea to have the escape key (ASCII value 27) call glutLeaveMainLoop() to 
+//It's often a good idea to have the escape key (ASCII value 27) call glutLeaveMainLoop() to
 //exit the program.
 void keyboard(unsigned char key, int x, int y)
 {
 	glutInitDisplayMode(displayMode);
 	glutInitContextVersion (3, 3);
 	glutInitContextProfile(GLUT_CORE_PROFILE);
-	glutInitWindowSize (width, height); 
+	glutInitWindowSize (width, height);
 	glutInitWindowPosition (300, 200);
 	glutCreateWindow (argv[0]);
 
 
 	init();
 
-	glutDisplayFunc(display); 
+	glutDisplayFunc(display);
 	glutReshapeFunc(reshape);
 	glutKeyboardFunc(keyboard);
 	glutMainLoop();