DXGL r726 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r725
|
r726
|
r727
>
Date:
04:05, 24 July 2017
Author:
admin
Status:
new
Tags:
Comment:
Support debug option to disable ARB or EXT framebuffers.
Make "no framebuffer" error dialog better.
Modified paths:
/ddraw/glExtensions.c
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glExtensions.c
—
—
@@ -1,5 +1,5 @@
2
2
// DXGL
3
-// Copyright (C) 2011-2016 William Feely
3
+// Copyright (C) 2011-2017 William Feely
4
4
5
5
// This library is free software; you can redistribute it and/or
6
6
// modify it under the terms of the GNU Lesser General Public
—
—
@@ -113,9 +113,11 @@
114
114
ExitProcess(-1);
115
115
}
116
116
glextensions = glGetString(GL_EXTENSIONS);
117
- if(strstr((char*)glextensions,"GL_ARB_framebuffer_object") || (ext->glver_major >= 3)) ext->GLEXT_ARB_framebuffer_object = 1;
117
+ if((strstr((char*)glextensions,"GL_ARB_framebuffer_object") || (ext->glver_major >= 3))
118
+ && !dxglcfg.DebugNoArbFramebuffer) ext->GLEXT_ARB_framebuffer_object = 1;
118
119
else ext->GLEXT_ARB_framebuffer_object = 0;
119
- if(strstr((char*)glextensions,"GL_EXT_framebuffer_object")) ext->GLEXT_EXT_framebuffer_object = 1;
120
+ if(strstr((char*)glextensions,"GL_EXT_framebuffer_object") && !dxglcfg.DebugNoExtFramebuffer)
121
+ ext->GLEXT_EXT_framebuffer_object = 1;
120
122
else ext->GLEXT_EXT_framebuffer_object = 0;
121
123
if(strstr((char*)glextensions,"GL_NV_packed_depth_stencil")) ext->GLEXT_NV_packed_depth_stencil = 1;
122
124
else ext->GLEXT_NV_packed_depth_stencil = 0;
—
—
@@ -213,8 +215,12 @@
214
216
}
215
217
if(broken_fbo)
216
218
{
217
- MessageBox(NULL,_T("DXGL requires support for OpenGL Framebuffer Objects to function. \
218
-Please contact your graphics card manufacturer for an updated driver. This program will now exit."),_T("Fatal error"),
219
+ if(dxglcfg.DebugNoArbFramebuffer || dxglcfg.DebugNoExtFramebuffer)
220
+ MessageBox(NULL, _T("An invalid debug setting has been detected. DXGL requires framebuffer support and the only \
221
+available framebuffer extension(s) have been disabled.\r\n\r\nPlease disable DebugNoArbFramebuffer and/or DebugNoExtFramebuffer \
222
+and restart this program.\r\n\r\nThis program will now exit."), _T("Fatal error"), MB_OK | MB_ICONERROR);
223
+ else MessageBox(NULL,_T("DXGL requires support for OpenGL Framebuffer Objects to function.\n\n\
224
+Please contact your graphics card manufacturer for an updated driver.\n\nThis program will now exit."),_T("Fatal error"),
219
225
MB_OK|MB_ICONERROR);
220
226
ExitProcess(-1);
221
227
}
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