DXGL r903 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r902
|
r903
|
r904
>
Date:
20:11, 10 March 2019
Author:
admin
Status:
new
Tags:
Comment:
Add detection for OpenGL rectangle textures.
Modified paths:
/ddraw/glExtensions.c
(modified) (
history
)
/ddraw/struct.h
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glExtensions.c
—
—
@@ -35,6 +35,7 @@
36
36
const GLubyte *glversion;
37
37
const GLubyte *glextensions;
38
38
BOOL broken_fbo;
39
+ BOOL broken_texrect;
39
40
ZeroMemory(ext, sizeof(glExtensions));
40
41
ext->atimem = FALSE;
41
42
glversion = glGetString(GL_VERSION);
—
—
@@ -130,6 +131,9 @@
131
132
if(strstr((char*)glextensions,"GL_EXT_framebuffer_object") && !dxglcfg.DebugNoExtFramebuffer)
132
133
ext->GLEXT_EXT_framebuffer_object = 1;
133
134
else ext->GLEXT_EXT_framebuffer_object = 0;
135
+ if (strstr((char*)glextensions, "GL_ARB_texture_rectangle") || (ext->glver_major > 3) ||
136
+ ((ext->glver_major == 3) && (ext->glver_minor == 1))) ext->GLEXT_ARB_texture_rectangle = 1;
137
+ else ext->GLEXT_ARB_texture_rectangle = 0;
134
138
if(strstr((char*)glextensions,"GL_NV_packed_depth_stencil")) ext->GLEXT_NV_packed_depth_stencil = 1;
135
139
else ext->GLEXT_NV_packed_depth_stencil = 0;
136
140
if(strstr((char*)glextensions,"GL_EXT_packed_depth_stencil")) ext->GLEXT_EXT_packed_depth_stencil = 1;
—
—
@@ -188,6 +192,8 @@
189
193
ext->glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)wglGetProcAddress("glDeleteFramebuffersEXT");
190
194
broken_fbo = FALSE;
191
195
}
196
+ broken_texrect = TRUE;
197
+ if (ext->GLEXT_ARB_texture_rectangle) broken_texrect = FALSE;
192
198
if(ext->GLEXT_EXT_direct_state_access)
193
199
{
194
200
ext->glTextureParameterfEXT = (PFNGLTEXTUREPARAMETERFEXTPROC)wglGetProcAddress("glTextureParameterfEXT");
—
—
@@ -240,6 +246,13 @@
241
247
MB_OK|MB_ICONERROR);
242
248
ExitProcess(-1);
243
249
}
250
+ if(broken_texrect)
251
+ {
252
+ MessageBox(NULL, _T("DXGL requires support for OpenGL Rectangle Textures to function.\n\n\
253
+Please contact your graphics card manufacturer for an updated driver.\n\nThis program will now exit."), _T("Fatal error"),
254
+MB_OK | MB_ICONERROR);
255
+ ExitProcess(-1);
256
+ }
244
257
ext->wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
245
258
ext->wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress("wglGetSwapIntervalEXT");
246
259
if((!ext->wglSwapIntervalEXT) || (!ext->wglGetSwapIntervalEXT))
Index: ddraw/struct.h
—
—
@@ -159,6 +159,7 @@
160
160
161
161
int GLEXT_ARB_framebuffer_object;
162
162
int GLEXT_EXT_framebuffer_object;
163
+ int GLEXT_ARB_texture_rectangle;
163
164
int GLEXT_NV_packed_depth_stencil;
164
165
int GLEXT_EXT_packed_depth_stencil;
165
166
int GLEXT_ARB_depth_buffer_float;
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version