mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-19 07:51:54 +00:00
Move wgl* function pointers
Most are only used in the unused draw_exp.cpp, move them there.
This commit is contained in:
parent
e6d8509752
commit
21f6eeaaeb
3 changed files with 32 additions and 43 deletions
|
@ -55,6 +55,22 @@ polygon offset factor causes occasional texture holes from highly angled texture
|
|||
|
||||
*/
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
static PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
|
||||
static PFNWGLGETPIXELFORMATATTRIBFVARBPROC wglGetPixelFormatAttribfvARB;
|
||||
|
||||
// WGL_ARB_pbuffer
|
||||
static PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB;
|
||||
static PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
|
||||
static PFNWGLRELEASEPBUFFERDCARBPROC wglReleasePbufferDCARB;
|
||||
static PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
|
||||
static PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB;
|
||||
|
||||
// WGL_ARB_render_texture
|
||||
static PFNWGLBINDTEXIMAGEARBPROC wglBindTexImageARB;
|
||||
static PFNWGLRELEASETEXIMAGEARBPROC wglReleaseTexImageARB;
|
||||
static PFNWGLSETPBUFFERATTRIBARBPROC wglSetPbufferAttribARB;
|
||||
|
||||
static bool initialized;
|
||||
|
||||
static int lightBufferSize = 1024;
|
||||
|
@ -508,6 +524,22 @@ void R_Exp_Allocate( void ) {
|
|||
|
||||
initialized = true;
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)GLimp_ExtensionPointer("wglGetPixelFormatAttribivARB");
|
||||
wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)GLimp_ExtensionPointer("wglGetPixelFormatAttribfvARB");
|
||||
|
||||
// WGL_ARB_pbuffer
|
||||
wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)GLimp_ExtensionPointer("wglCreatePbufferARB");
|
||||
wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)GLimp_ExtensionPointer("wglGetPbufferDCARB");
|
||||
wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)GLimp_ExtensionPointer("wglReleasePbufferDCARB");
|
||||
wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)GLimp_ExtensionPointer("wglDestroyPbufferARB");
|
||||
wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)GLimp_ExtensionPointer("wglQueryPbufferARB");
|
||||
|
||||
// WGL_ARB_render_texture
|
||||
wglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC)GLimp_ExtensionPointer("wglBindTexImageARB");
|
||||
wglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC)GLimp_ExtensionPointer("wglReleaseTexImageARB");
|
||||
wglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC)GLimp_ExtensionPointer("wglSetPbufferAttribARB");
|
||||
|
||||
#if 1
|
||||
//
|
||||
// allocate the floating point rendering buffer
|
||||
|
|
|
@ -58,22 +58,8 @@ static PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
|||
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
|
||||
PFNWGLGETPIXELFORMATATTRIBFVARBPROC wglGetPixelFormatAttribfvARB;
|
||||
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
|
||||
|
||||
// WGL_ARB_pbuffer
|
||||
PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB;
|
||||
PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
|
||||
PFNWGLRELEASEPBUFFERDCARBPROC wglReleasePbufferDCARB;
|
||||
PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
|
||||
PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB;
|
||||
|
||||
// WGL_ARB_render_texture
|
||||
PFNWGLBINDTEXIMAGEARBPROC wglBindTexImageARB;
|
||||
PFNWGLRELEASETEXIMAGEARBPROC wglReleaseTexImageARB;
|
||||
PFNWGLSETPBUFFERATTRIBARBPROC wglSetPbufferAttribARB;
|
||||
|
||||
/* ARB_pixel_format */
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
|
@ -290,21 +276,7 @@ void GLW_CheckWGLExtensions( HDC hDC ) {
|
|||
r_swapInterval.SetModified(); // force a set next frame
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)GLimp_ExtensionPointer("wglGetPixelFormatAttribivARB");
|
||||
wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)GLimp_ExtensionPointer("wglGetPixelFormatAttribfvARB");
|
||||
wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)GLimp_ExtensionPointer("wglChoosePixelFormatARB");
|
||||
|
||||
// WGL_ARB_pbuffer
|
||||
wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)GLimp_ExtensionPointer("wglCreatePbufferARB");
|
||||
wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)GLimp_ExtensionPointer("wglGetPbufferDCARB");
|
||||
wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)GLimp_ExtensionPointer("wglReleasePbufferDCARB");
|
||||
wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)GLimp_ExtensionPointer("wglDestroyPbufferARB");
|
||||
wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)GLimp_ExtensionPointer("wglQueryPbufferARB");
|
||||
|
||||
// WGL_ARB_render_texture
|
||||
wglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC)GLimp_ExtensionPointer("wglBindTexImageARB");
|
||||
wglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC)GLimp_ExtensionPointer("wglReleaseTexImageARB");
|
||||
wglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC)GLimp_ExtensionPointer("wglSetPbufferAttribARB");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -52,23 +52,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
extern PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
|
||||
extern PFNWGLGETPIXELFORMATATTRIBFVARBPROC wglGetPixelFormatAttribfvARB;
|
||||
extern PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
|
||||
|
||||
// WGL_ARB_pbuffer
|
||||
extern PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB;
|
||||
extern PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
|
||||
extern PFNWGLRELEASEPBUFFERDCARBPROC wglReleasePbufferDCARB;
|
||||
extern PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
|
||||
extern PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB;
|
||||
|
||||
// WGL_ARB_render_texture
|
||||
extern PFNWGLBINDTEXIMAGEARBPROC wglBindTexImageARB;
|
||||
extern PFNWGLRELEASETEXIMAGEARBPROC wglReleaseTexImageARB;
|
||||
extern PFNWGLSETPBUFFERATTRIBARBPROC wglSetPbufferAttribARB;
|
||||
|
||||
|
||||
#define MAX_OSPATH 256
|
||||
|
||||
#define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE | WS_THICKFRAME)
|
||||
|
|
Loading…
Reference in a new issue