DXGL r64 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r63
|
r64
|
r65
>
Date:
22:33, 31 December 2011
Author:
admin
Status:
new
Tags:
Comment:
Add IDirect3D7::CreateDevice
Add IDirect3D7Device::GetViewport and SetViewport
Modified paths:
/ddraw/glDirect3D.cpp
(modified) (
history
)
/ddraw/glDirect3DDevice.cpp
(modified) (
history
)
/ddraw/glDirect3DDevice.h
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3D.cpp
—
—
@@ -56,8 +56,9 @@
57
57
58
58
HRESULT WINAPI glDirect3D7::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice)
59
59
{
60
- FIXME("glDirect3D7::CreateDevice: stub");
61
- return DDERR_GENERIC;
60
+ glDirect3DDevice7 *glD3DDev7 = new glDirect3DDevice7(this,(glDirectDrawSurface7*)lpDDS);
61
+ *lplpD3DDevice = (LPDIRECT3DDEVICE7) glD3DDev7;
62
+ return D3D_OK;
62
63
}
63
64
HRESULT WINAPI glDirect3D7::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER7* lplpD3DVertexBuffer, DWORD dwFlags)
64
65
{
Index: ddraw/glDirect3DDevice.cpp
—
—
@@ -28,6 +28,7 @@
29
29
glD3D7->AddRef();
30
30
this->glDDS7 = glDDS7;
31
31
glDDS7->AddRef();
32
+ ZeroMemory(&viewport,sizeof(D3DVIEWPORT7));
32
33
}
33
34
glDirect3DDevice7::~glDirect3DDevice7()
34
35
{
—
—
@@ -191,7 +192,7 @@
192
193
FIXME("glDirect3DDevice7::GetRenderState: stub");
193
194
ERR(DDERR_GENERIC);
194
195
}
195
-HRESULT WINAPI glDirect3DDevice7::GetRenderTarget(LPDIRECTDRAWSURFACE7 lplpRenderTarget)
196
+HRESULT WINAPI glDirect3DDevice7::GetRenderTarget(LPDIRECTDRAWSURFACE7 *lplpRenderTarget)
196
197
{
197
198
FIXME("glDirect3DDevice7::GetRenderTarget: stub");
198
199
ERR(DDERR_GENERIC);
—
—
@@ -218,8 +219,8 @@
219
220
}
220
221
HRESULT WINAPI glDirect3DDevice7::GetViewport(LPD3DVIEWPORT7 lpViewport)
221
222
{
222
- FIXME("glDirect3DDevice7::GetViewport: stub");
223
- ERR(DDERR_GENERIC);
223
+ memcpy(lpViewport,&viewport,sizeof(D3DVIEWPORT7));
224
+ return D3D_OK;
224
225
}
225
226
HRESULT WINAPI glDirect3DDevice7::LightEnable(DWORD dwLightIndex, BOOL bEnable)
226
227
{
—
—
@@ -294,8 +295,8 @@
295
296
}
296
297
HRESULT WINAPI glDirect3DDevice7::SetViewport(LPD3DVIEWPORT7 lpViewport)
297
298
{
298
- FIXME("glDirect3DDevice7::SetViewport: stub");
299
- ERR(DDERR_GENERIC);
299
+ memcpy(&viewport,lpViewport,sizeof(D3DVIEWPORT7));
300
+ return D3D_OK;
300
301
}
301
302
HRESULT WINAPI glDirect3DDevice7::ValidateDevice(LPDWORD lpdwPasses)
302
303
{
Index: ddraw/glDirect3DDevice.h
—
—
@@ -61,7 +61,7 @@
62
62
HRESULT WINAPI GetLightEnable(DWORD dwLightIndex, BOOL* pbEnable);
63
63
HRESULT WINAPI GetMaterial(LPD3DMATERIAL7 lpMaterial);
64
64
HRESULT WINAPI GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState);
65
- HRESULT WINAPI GetRenderTarget(LPDIRECTDRAWSURFACE7 lplpRenderTarget);
65
+ HRESULT WINAPI GetRenderTarget(LPDIRECTDRAWSURFACE7 *lplpRenderTarget);
66
66
HRESULT WINAPI GetStateData(DWORD dwState, LPVOID* lplpStateData);
67
67
HRESULT WINAPI GetTexture(DWORD dwStage, LPDIRECTDRAWSURFACE7 *lplpTexture);
68
68
HRESULT WINAPI GetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, LPDWORD lpdwValue);
—
—
@@ -89,7 +89,7 @@
90
90
glDirect3D7 *glD3D7;
91
91
glDirectDrawSurface7 *glDDS7;
92
92
ULONG refcount;
93
-
93
+ D3DVIEWPORT7 viewport;
94
94
};
95
95
96
96
#endif //__GLDIRECT3DDEVICE_H
\ No newline at end of file
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