Browse Source

Added SDL GL buffer swap

Thomas Buck 10 years ago
parent
commit
794f871462
3 changed files with 8 additions and 0 deletions
  1. 2
    0
      include/Window.h
  2. 2
    0
      include/WindowSDL.h
  3. 4
    0
      src/WindowSDL.cpp

+ 2
- 0
include/Window.h View File

@@ -37,6 +37,8 @@ public:
37 37
 
38 38
     virtual void writeString(WindowString *s) = 0;
39 39
 
40
+    virtual void swapBuffersGL() = 0;
41
+
40 42
     virtual void resizeGL(unsigned int w, unsigned int h);
41 43
 };
42 44
 

+ 2
- 0
include/WindowSDL.h View File

@@ -40,6 +40,8 @@ public:
40 40
 
41 41
     virtual void writeString(WindowString *s);
42 42
 
43
+    virtual void swapBuffersGL();
44
+
43 45
 private:
44 46
     bool mInit;
45 47
     char *mDriver;

+ 4
- 0
src/WindowSDL.cpp View File

@@ -139,3 +139,7 @@ void WindowSDL::writeString(WindowString *s) {
139 139
 
140 140
 }
141 141
 
142
+void WindowSDL::swapBuffersGL() {
143
+    SDL_GL_SwapWindow(mWindow);
144
+}
145
+

Loading…
Cancel
Save