File diff r24879:89d0ee92066a → r24880:f078a91a5521
src/video/win32_v.cpp
Show inline comments
 
@@ -1328,12 +1328,18 @@ void VideoDriver_Win32GDI::PaintThread()
 
#include "opengl.h"
 

	
 
#ifndef PFD_SUPPORT_COMPOSITION
 
#	define PFD_SUPPORT_COMPOSITION 0x00008000
 
#endif
 

	
 
/** Platform-specific callback to get an OpenGL funtion pointer. */
 
static OGLProc GetOGLProcAddressCallback(const char *proc)
 
{
 
	return reinterpret_cast<OGLProc>(wglGetProcAddress(proc));
 
}
 

	
 
static FVideoDriver_Win32OpenGL iFVideoDriver_Win32OpenGL;
 

	
 
const char *VideoDriver_Win32OpenGL::Start(const StringList &param)
 
{
 
	if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return "Only 32bpp blitters supported";
 

	
 
@@ -1409,13 +1415,13 @@ const char *VideoDriver_Win32OpenGL::All
 

	
 
	/* Create OpenGL device context. */
 
	this->gl_rc = wglCreateContext(this->dc);
 
	if (this->gl_rc == 0) return "Can't create OpenGL context";
 
	if (!wglMakeCurrent(this->dc, this->gl_rc)) return "Can't active GL context";
 

	
 
	return OpenGLBackend::Create();
 
	return OpenGLBackend::Create(&GetOGLProcAddressCallback);
 
}
 

	
 
bool VideoDriver_Win32OpenGL::ToggleFullscreen(bool full_screen)
 
{
 
	this->DestroyContext();
 
	bool res = this->VideoDriver_Win32Base::ToggleFullscreen(full_screen);