Skip to content
Browse files

Added glewInit for linux plattform

  • Loading branch information...
1 parent 758e85f commit e074f2b8480a8524595f2f7221a28e74674d1abc @manolopm manolopm committed Jan 21, 2012
Showing with 11 additions and 3 deletions.
  1. +2 −2 Core.cpp
  2. +9 −1 Core.h
View
4 Core.cpp
@@ -84,14 +84,14 @@ int Core::Initialize(std::string title_ = "Title" , int width_ = DefaultWidth, i
Logger::Instance()->OutputString("SDL_SetVideoMode succeeded");
-#ifdef __WIN32__
+#ifdef __NEEDSGLEW__
// GLEW
if (glewInit() != GLEW_OK) {
Logger::Instance()->OutputString("Error: glewInit()");
return -1;
}
Logger::Instance()->OutputString("glewInit succeeded");
-#endif __WIN32__
+#endif __NEEDSGLEW__
// オプションのテクスチャ
glGenTextures(1, &optionTexture);
View
10 Core.h
@@ -3,6 +3,14 @@
#include <SDL.h>
+#ifdef __WIN32__
+#define __NEEDSGLEW__
+#endif __WIN32__
+
+#ifdef __linux__
+#define __NEEDSGLEW__
+#endif __linux__
+
#ifdef __WIN32__
#include <windows.h>
#endif __WIN32__
@@ -87,4 +95,4 @@ class Core {
};
-#endif
+#endif

0 comments on commit e074f2b

Please sign in to comment.
Something went wrong with that request. Please try again.