DXGL r109 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r108‎ | r109 | r110 >
Date:15:39, 3 March 2012
Author:admin
Status:new
Tags:
Comment:
Release 0.1.6
Re-add debug-only restriction on Direct3D
Modified paths:
  • /ReadMe.txt (modified) (history)
  • /common/version.h (modified) (history)
  • /ddraw/glDirectDraw.cpp (modified) (history)
  • /dxgltest/dxgltest.cpp (modified) (history)

Diff [purge]

Index: ReadMe.txt
@@ -1,3 +1,6 @@
 2+DXGL 0.1.6
 3+http://www.williamfeely.info/wiki/DXGL
 4+
25 == Introduction ==
36
47 DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL 2.0. It is intended to alleviate some of the graphics glitches inherent with using legacy DirectX interfaces on modern video cards. The API will be 100% binary compatible with the system ddraw.dll file.
@@ -6,15 +9,15 @@
710
811 == System Requirements ==
912
10 -* Windows operating system (currently XP or above)
11 -* OpenGL 2.0 or higher compatible video card, with hardware accelerated non-power-of-two size textures.
12 - Geforce FX series graphics cards are NOT supported because non-power-of-two textures are emulated in software.
 13+* Windows XP, Vista, 7, or 8 (May work under recent builds of Wine)
 14+* OpenGL 2.0 or higher compatible video card, with hardware accelerated non-power-of-two size textures
 15+* Visual C++ 2010 x86 runtime, available at http://www.microsoft.com/download/en/details.aspx?id=5555 (will be installed if not present)
1316
1417 == Build Requirements ==
1518 * Visual Studio 2010 or Visual C++ 2010 Express
16 -* Latest version of Windows SDK
 19+* Latest version of Windows SDK may be required
1720
18 -== Build instructions ==
 21+== Build Instructions ==
1922 These instructions assume that you do not have any of the required software installed. If you already have any or all of this software installed and set up, skip those steps.
2023 * Install Visual C++ 2010 Express at http://www.microsoft.com/express/downloads/#2010-Visual-CPP
2124 * Install the Windows SDK at:
@@ -24,13 +27,13 @@
2528 * Open the dxgl.sln file, select your build configuration (Debug or Release) in the toolbar, and press F5.
2629
2730 == Progress ==
28 -For detailed progress information, please check https://www.williamfeely.info/wiki/DXGL_Features
 31+For detailed progress information, please check http://www.williamfeely.info/wiki/DXGL_Features
2932 What works:
3033 * DirectDraw object creation and destruction (versions 1 to 7)
3134 * Display mode enumeration and switching (with emulated mode switching)
3235 * Fullscreen and windowed modes.
3336 * Basic Blt() functionality
34 -* 8-bit color
 37+* 8-bit color with GLSL shader
3538
3639 What partially works:
3740 * SetCooperativeLevel (destroys the GL context if switching between windowed and fullscreen modes)
@@ -50,7 +53,7 @@
5154 https://www.williamfeely.info/svn/dxgl
5255
5356 There is a Mediawiki-based SVN log at:
54 -https://www.williamfeely.info/wiki/Special:Code/DXGL
 57+http://www.williamfeely.info/wiki/Special:Code/DXGL
5558
5659 == AppDB ==
5760
Index: common/version.h
@@ -4,12 +4,12 @@
55
66 #define DXGLMAJOR 0
77 #define DXGLMINOR 1
8 -#define DXGLPOINT 5
 8+#define DXGLPOINT 6
99 #define DXGLBUILD 0
1010
1111 #define DXGLVERNUMBER DXGLMAJOR,DXGLMINOR,DXGLPOINT,DXGLBUILD
1212 #define DXGLVERQWORD (((unsigned __int64)DXGLMAJOR<<48)+((unsigned __int64)DXGLMINOR<<32)+((unsigned __int64)DXGLPOINT<<16)+(unsigned __int64)DXGLBUILD)
13 -#define DXGLVERSTRING "0.1.5.0"
 13+#define DXGLVERSTRING "0.1.6.0"
1414
1515
1616 #endif //__VERSION_H
Index: ddraw/glDirectDraw.cpp
@@ -649,9 +649,14 @@
650650 }
651651 if(riid == IID_IDirect3D7)
652652 {
 653+ #ifdef _DEBUG
653654 this->AddRef();
654655 *ppvObj = new glDirect3D7(this);
655656 return DD_OK;
 657+ #else
 658+ FIXME("Add IDirect3D Interfaces\n");
 659+ ERR(DDERR_GENERIC);
 660+ #endif
656661 }
657662 if(riid == IID_IDirectDrawGammaControl)
658663 {
Index: dxgltest/dxgltest.cpp
@@ -713,11 +713,15 @@
714714 tab.pszText = _T("2D Graphics");
715715 hTab = GetDlgItem(hWnd,IDC_TABS);
716716 SendDlgItemMessage(hWnd,IDC_TABS,TCM_INSERTITEM,1,(LPARAM)&tab);
 717+ #ifdef _DEBUG
717718 tab.pszText = _T("3D Graphics");
718719 SendDlgItemMessage(hWnd,IDC_TABS,TCM_INSERTITEM,2,(LPARAM)&tab);
 720+ #endif
719721 tabwnd[0] = CreateDialog(hinstance,MAKEINTRESOURCE(IDD_SYSINFO),hTab,SysTabCallback);
720722 tabwnd[1] = CreateDialog(hinstance,MAKEINTRESOURCE(IDD_TESTGFX),hTab,Test2DCallback);
 723+ #ifdef _DEBUG
721724 tabwnd[2] = CreateDialog(hinstance,MAKEINTRESOURCE(IDD_TESTGFX),hTab,Test3DCallback);
 725+ #endif
722726 SendDlgItemMessage(hWnd,IDC_TABS,TCM_GETITEMRECT,0,(LPARAM)&tabrect);
723727 SetWindowPos(tabwnd[0],NULL,tabrect.left,tabrect.bottom+3,0,0,SWP_SHOWWINDOW|SWP_NOSIZE);
724728 ShowWindow(tabwnd[1],SW_HIDE);