DXGL r195 - Code Review

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 @@
2323 #include "glDirectDraw.h"
2424 #include "glDirectDrawSurface.h"
2525 #include "glDirect3DVertexBuffer.h"
 26+#include "glDirect3DViewport.h"
 27+#include "glDirect3DMaterial.h"
2628
2729 D3DDEVICEDESC7 d3ddesc =
2830 {
@@ -230,9 +232,10 @@
231233 HRESULT WINAPI glDirect3D7::CreateMaterial(LPDIRECT3DMATERIAL3* lplpDirect3DMaterial, IUnknown* pUnkOuter)
232234 {
233235 if(!this) return DDERR_INVALIDPARAMS;
 236+ if(!lplpDirect3DMaterial) return D3D_OK;
234237 if(pUnkOuter) return DDERR_INVALIDPARAMS;
235 - FIXME("glDirect3D7::CreateMaterial: stub");
236 - return DDERR_GENERIC;
 238+ *lplpDirect3DMaterial = new glDirect3DMaterial3();
 239+ return D3D_OK;
237240 }
238241 HRESULT WINAPI glDirect3D7::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER7* lplpD3DVertexBuffer, DWORD dwFlags)
239242 {
@@ -245,9 +248,10 @@
246249 HRESULT WINAPI glDirect3D7::CreateViewport(LPDIRECT3DVIEWPORT3* lplpD3DViewport, IUnknown* pUnkOuter)
247250 {
248251 if(!this) return DDERR_INVALIDPARAMS;
 252+ if(!lplpD3DViewport) return DDERR_INVALIDPARAMS;
249253 if(pUnkOuter) return DDERR_INVALIDPARAMS;
250 - FIXME("glDirect3D7::CreateViewport: stub");
251 - return DDERR_GENERIC;
 254+ *lplpD3DViewport = new glDirect3DViewport3();
 255+ return D3D_OK;
252256 }
253257 HRESULT WINAPI glDirect3D7::EnumDevices(LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg)
254258 {