DXGL r327 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r326‎ | r327 | r328 >
Date:17:03, 17 February 2013
Author:admin
Status:new
Tags:
Comment:
Remove broken texcoord wrap optimization.
Set render target for new IDirect3DDevice object.
Set viewport for IDirect3DDevice::Execute.
Modified paths:
  • /ddraw/glDirect3DDevice.cpp (modified) (history)
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)
  • /ddraw/glutil.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirect3DDevice.cpp
@@ -2114,6 +2114,14 @@
21152115 if(!this) return DDERR_INVALIDOBJECT;
21162116 if(!lpDirect3DExecuteBuffer) return DDERR_INVALIDPARAMS;
21172117 if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
 2118+ LPDIRECT3DVIEWPORT3 vp;
 2119+ lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&vp);
 2120+ if(FAILED(SetCurrentViewport(vp)))
 2121+ {
 2122+ vp->Release();
 2123+ return DDERR_INVALIDPARAMS;
 2124+ }
 2125+ vp->Release();
21182126 D3DEXECUTEBUFFERDESC desc;
21192127 D3DEXECUTEDATA data;
21202128 HRESULT err = ((glDirect3DExecuteBuffer*)lpDirect3DExecuteBuffer)->ExecuteLock(&desc,&data);
Index: ddraw/glDirectDrawSurface.cpp
@@ -464,6 +464,7 @@
465465 return E_NOINTERFACE;
466466 }
467467 HRESULT ret = tmpdev->QueryInterface(IID_IDirect3DDevice,ppvObj);
 468+ tmpdev->SetRenderTarget(this,0);
468469 tmpdev->Release();
469470 tmpd3d->Release();
470471 return ret;
Index: ddraw/glutil.cpp
@@ -172,8 +172,8 @@
173173 default:
174174 return;
175175 }
176 - if(texwrap[level*2+coord] == wrapmode) return;
177 - else
 176+ //if(texwrap[level*2+coord] == wrapmode) return;
 177+ //else
178178 {
179179 texwrap[level*2+coord] = wrapmode;
180180 //int currtexture = texlevel;