Sfoglia il codice sorgente

Added SDL GL buffer swap

Thomas Buck 10 anni fa
parent
commit
794f871462
3 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 2
    0
      include/Window.h
  2. 2
    0
      include/WindowSDL.h
  3. 4
    0
      src/WindowSDL.cpp

+ 2
- 0
include/Window.h Vedi 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 Vedi 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 Vedi 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…
Annulla
Salva