framebuffer read lock; gl raster to image

This commit is contained in:
aap
2021-01-21 02:23:28 +01:00
parent baa8666a03
commit 9260bddc66
7 changed files with 210 additions and 57 deletions
+1 -36
View File
@@ -25,43 +25,8 @@
namespace rw {
namespace gl3 {
struct DisplayMode
{
#ifdef LIBRW_SDL2
SDL_DisplayMode mode;
#else
GLFWvidmode mode;
#endif
int32 depth;
uint32 flags;
};
struct GlGlobals
{
#ifdef LIBRW_SDL2
SDL_Window **pWindow;
SDL_Window *window;
SDL_GLContext glcontext;
#else
GLFWwindow **pWindow;
GLFWwindow *window;
GLFWmonitor *monitor;
int numMonitors;
int currentMonitor;
#endif
DisplayMode *modes;
int numModes;
int currentMode;
int presentWidth, presentHeight;
int presentOffX, presentOffY;
// for opening the window
int winWidth, winHeight;
const char *winTitle;
uint32 numSamples;
} glGlobals;
GlGlobals glGlobals;
Gl3Caps gl3Caps;
// terrible hack for GLES