DXGL r195 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r194
|
r195
|
r196
>
Date:
14:13, 4 July 2012
Author:
admin
Status:
new
Tags:
Comment:
Support creating materials and viewports.
Modified paths:
/ddraw/glDirect3D.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3D.cpp
—
—
@@ -22,6 +22,8 @@
23
23
#include "glDirectDraw.h"
24
24
#include "glDirectDrawSurface.h"
25
25
#include "glDirect3DVertexBuffer.h"
26
+#include "glDirect3DViewport.h"
27
+#include "glDirect3DMaterial.h"
26
28
27
29
D3DDEVICEDESC7 d3ddesc =
28
30
{
—
—
@@ -230,9 +232,10 @@
231
233
HRESULT WINAPI glDirect3D7::CreateMaterial(LPDIRECT3DMATERIAL3* lplpDirect3DMaterial, IUnknown* pUnkOuter)
232
234
{
233
235
if(!this) return DDERR_INVALIDPARAMS;
236
+ if(!lplpDirect3DMaterial) return D3D_OK;
234
237
if(pUnkOuter) return DDERR_INVALIDPARAMS;
235
- FIXME("glDirect3D7::CreateMaterial: stub");
236
- return DDERR_GENERIC;
238
+ *lplpDirect3DMaterial = new glDirect3DMaterial3();
239
+ return D3D_OK;
237
240
}
238
241
HRESULT WINAPI glDirect3D7::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER7* lplpD3DVertexBuffer, DWORD dwFlags)
239
242
{
—
—
@@ -245,9 +248,10 @@
246
249
HRESULT WINAPI glDirect3D7::CreateViewport(LPDIRECT3DVIEWPORT3* lplpD3DViewport, IUnknown* pUnkOuter)
247
250
{
248
251
if(!this) return DDERR_INVALIDPARAMS;
252
+ if(!lplpD3DViewport) return DDERR_INVALIDPARAMS;
249
253
if(pUnkOuter) return DDERR_INVALIDPARAMS;
250
- FIXME("glDirect3D7::CreateViewport: stub");
251
- return DDERR_GENERIC;
254
+ *lplpD3DViewport = new glDirect3DViewport3();
255
+ return D3D_OK;
252
256
}
253
257
HRESULT WINAPI glDirect3D7::EnumDevices(LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg)
254
258
{
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