|
@@ -22,7 +22,9 @@
|
|
|
#define SDL_BAPP_H
|
|
|
|
|
|
#include <InterfaceKit.h>
|
|
|
+#if SDL_VIDEO_OPENGL
|
|
|
#include <OpenGLKit.h>
|
|
|
+#endif
|
|
|
|
|
|
#include "../../video/haiku/SDL_bkeyboard.h"
|
|
|
|
|
@@ -80,7 +82,9 @@ class SDL_BApp : public BApplication {
|
|
|
public:
|
|
|
SDL_BApp(const char* signature) :
|
|
|
BApplication(signature) {
|
|
|
+#if SDL_VIDEO_OPENGL
|
|
|
_current_context = NULL;
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
|
|
@@ -188,6 +192,7 @@ public:
|
|
|
return _window_map[winID];
|
|
|
}
|
|
|
|
|
|
+#if SDL_VIDEO_OPENGL
|
|
|
void SetCurrentContext(BGLView *newContext) {
|
|
|
if(_current_context)
|
|
|
_current_context->UnlockGL();
|
|
@@ -195,6 +200,8 @@ public:
|
|
|
if (_current_context)
|
|
|
_current_context->LockGL();
|
|
|
}
|
|
|
+#endif
|
|
|
+
|
|
|
private:
|
|
|
/* Event management */
|
|
|
void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) {
|
|
@@ -384,7 +391,9 @@ private:
|
|
|
/* Members */
|
|
|
std::vector<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id */
|
|
|
|
|
|
+#if SDL_VIDEO_OPENGL
|
|
|
BGLView *_current_context;
|
|
|
+#endif
|
|
|
};
|
|
|
|
|
|
#endif
|