DXGL r548 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r547
|
r548
|
r549
>
Date:
22:31, 11 October 2014
Author:
admin
Status:
new
Tags:
Comment:
Fill in texture size caps when creating a DDraw object.
Fill in D3D z compare caps.
Modified paths:
/ddraw/glDirect3D.cpp
(modified) (
history
)
/ddraw/glDirectDraw.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3D.cpp
—
—
@@ -40,7 +40,8 @@
41
41
D3DPMISCCAPS_CULLCCW | D3DPMISCCAPS_CULLCW | D3DPMISCCAPS_CULLNONE, // dwMiscCaps
42
42
D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_ZTEST | D3DPRASTERCAPS_FOGRANGE | D3DPRASTERCAPS_FOGTABLE |
43
43
D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_WFOG, //dwRasterCaps
44
- D3DPCMPCAPS_LESSEQUAL, //dwZCmpCaps
44
+ D3DPCMPCAPS_ALWAYS | D3DPCMPCAPS_EQUAL | D3DPCMPCAPS_GREATER | D3DPCMPCAPS_GREATEREQUAL |
45
+ D3DPCMPCAPS_LESS | D3DPCMPCAPS_LESSEQUAL | D3DPCMPCAPS_NEVER | D3DPCMPCAPS_NOTEQUAL, //dwZCmpCaps
45
46
D3DPBLENDCAPS_ZERO | D3DPBLENDCAPS_ONE | D3DPBLENDCAPS_SRCCOLOR | D3DPBLENDCAPS_INVSRCCOLOR |
46
47
D3DPBLENDCAPS_SRCALPHA | D3DPBLENDCAPS_INVSRCALPHA | D3DPBLENDCAPS_DESTALPHA |
47
48
D3DPBLENDCAPS_INVDESTALPHA | D3DPBLENDCAPS_DESTCOLOR | D3DPBLENDCAPS_INVDESTCOLOR |
Index: ddraw/glDirectDraw.cpp
—
—
@@ -1403,6 +1403,29 @@
1404
1404
}
1405
1405
d3ddesc = d3ddesc_default;
1406
1406
d3ddesc3 = d3ddesc3_default;
1407
+ if (!renderer)
1408
+ {
1409
+ HWND hGLWnd = CreateWindow(_T("Test"), NULL, WS_POPUP, 0, 0, 16, 16, NULL, NULL, NULL, NULL);
1410
+ glRenderer *tmprenderer = (glRenderer*)malloc(sizeof(glRenderer));
1411
+ DEVMODE mode;
1412
+ mode.dmSize = sizeof(DEVMODE);
1413
+ EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &mode);
1414
+ glRenderer_Init(tmprenderer, 16, 16, mode.dmBitsPerPel, false, mode.dmDisplayFrequency, hGLWnd, NULL, FALSE);
1415
+ d3ddesc.dwMaxTextureWidth = d3ddesc.dwMaxTextureHeight =
1416
+ d3ddesc.dwMaxTextureRepeat = d3ddesc.dwMaxTextureAspectRatio = tmprenderer->gl_caps.TextureMax;
1417
+ d3ddesc3.dwMaxTextureWidth = d3ddesc3.dwMaxTextureHeight =
1418
+ d3ddesc3.dwMaxTextureRepeat = d3ddesc3.dwMaxTextureAspectRatio = tmprenderer->gl_caps.TextureMax;
1419
+ glRenderer_Delete(tmprenderer);
1420
+ free(tmprenderer);
1421
+ }
1422
+ else
1423
+ {
1424
+ d3ddesc.dwMaxTextureWidth = d3ddesc.dwMaxTextureHeight =
1425
+ d3ddesc.dwMaxTextureRepeat = d3ddesc.dwMaxTextureAspectRatio = renderer->gl_caps.TextureMax;
1426
+ d3ddesc3.dwMaxTextureWidth = d3ddesc3.dwMaxTextureHeight =
1427
+ d3ddesc3.dwMaxTextureRepeat = d3ddesc3.dwMaxTextureAspectRatio = renderer->gl_caps.TextureMax;
1428
+ }
1429
+
1407
1430
memcpy(stored_devices, d3ddevices, 3 * sizeof(D3DDevice));
1408
1431
winstyle = winstyleex = 0;
1409
1432
initialized = true;
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