mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-29 15:32:54 +00:00
Merge branch 'gl_swframebuffer' into qzdoom
This commit is contained in:
commit
f313bfd2cc
2 changed files with 11 additions and 2 deletions
|
@ -56,6 +56,8 @@ EXTERN_CVAR (Bool, fullscreen)
|
||||||
EXTERN_CVAR (Bool, swtruecolor)
|
EXTERN_CVAR (Bool, swtruecolor)
|
||||||
EXTERN_CVAR (Float, vid_winscale)
|
EXTERN_CVAR (Float, vid_winscale)
|
||||||
|
|
||||||
|
CVAR (Bool, vid_sdl, 0, 0);
|
||||||
|
|
||||||
IVideo *Video;
|
IVideo *Video;
|
||||||
|
|
||||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||||
|
@ -120,7 +122,7 @@ void I_InitGraphics ()
|
||||||
ticker.SetGenericRepDefault (val, CVAR_Bool);
|
ticker.SetGenericRepDefault (val, CVAR_Bool);
|
||||||
|
|
||||||
//currentrenderer = vid_renderer;
|
//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);
|
else Video = new SDLVideo (0);
|
||||||
|
|
||||||
if (Video == NULL)
|
if (Video == NULL)
|
||||||
|
|
|
@ -52,6 +52,8 @@ EXTERN_CVAR (Int, vid_renderer)
|
||||||
EXTERN_CVAR (Int, vid_maxfps)
|
EXTERN_CVAR (Int, vid_maxfps)
|
||||||
EXTERN_CVAR (Bool, cl_capfps)
|
EXTERN_CVAR (Bool, cl_capfps)
|
||||||
|
|
||||||
|
DFrameBuffer *CreateGLSWFrameBuffer(int width, int height, bool fullscreen);
|
||||||
|
|
||||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
|
@ -194,7 +196,12 @@ DFrameBuffer *SDLGLVideo::CreateFrameBuffer (int width, int height, bool bgra, b
|
||||||
// flashAmount = 0;
|
// 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;
|
retry = 0;
|
||||||
|
|
||||||
// If we could not create the framebuffer, try again with slightly
|
// If we could not create the framebuffer, try again with slightly
|
||||||
|
|
Loading…
Reference in a new issue