mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Add Linux support for GLSWFrameBuffer
This commit is contained in:
parent
f81d0d3964
commit
7beac65471
2 changed files with 11 additions and 2 deletions
|
@ -55,6 +55,8 @@ EXTERN_CVAR (Bool, ticker)
|
|||
EXTERN_CVAR (Bool, fullscreen)
|
||||
EXTERN_CVAR (Float, vid_winscale)
|
||||
|
||||
CVAR (Bool, vid_sdl, 0, 0);
|
||||
|
||||
IVideo *Video;
|
||||
|
||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||
|
@ -119,7 +121,7 @@ void I_InitGraphics ()
|
|||
ticker.SetGenericRepDefault (val, CVAR_Bool);
|
||||
|
||||
//currentrenderer = vid_renderer;
|
||||
if (currentrenderer==1) Video = new SDLGLVideo(0);
|
||||
if (currentrenderer==1 || vid_sdl==0) Video = new SDLGLVideo(0);
|
||||
else Video = new SDLVideo (0);
|
||||
|
||||
if (Video == NULL)
|
||||
|
|
|
@ -52,6 +52,8 @@ EXTERN_CVAR (Int, vid_renderer)
|
|||
EXTERN_CVAR (Int, vid_maxfps)
|
||||
EXTERN_CVAR (Bool, cl_capfps)
|
||||
|
||||
DFrameBuffer *CreateGLSWFrameBuffer(int width, int height, bool fullscreen);
|
||||
|
||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||
|
||||
CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
|
@ -194,7 +196,12 @@ DFrameBuffer *SDLGLVideo::CreateFrameBuffer (int width, int height, bool fullscr
|
|||
// flashAmount = 0;
|
||||
}
|
||||
|
||||
SDLGLFB *fb = new OpenGLFrameBuffer (0, width, height, 32, 60, fullscreen);
|
||||
SDLGLFB *fb;
|
||||
if (vid_renderer == 1)
|
||||
fb = new OpenGLFrameBuffer (0, width, height, 32, 60, fullscreen);
|
||||
else
|
||||
fb = (SDLGLFB*)CreateGLSWFrameBuffer (width, height, fullscreen);
|
||||
|
||||
retry = 0;
|
||||
|
||||
// If we could not create the framebuffer, try again with slightly
|
||||
|
|
Loading…
Reference in a new issue