DXGL r460 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r459‎ | r460 | r461 >
Date:00:11, 7 July 2014
Author:admin
Status:new
Tags:
Comment:
Fix clip list vertices and render whole clip list.
Modified paths:
  • /ddraw/glDirectDrawClipper.cpp (modified) (history)
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDrawClipper.cpp
@@ -223,7 +223,7 @@
224224 memcpy(This->cliplist,lpClipList->Buffer,lpClipList->rdh.nCount*sizeof(RECT));
225225 for(int i = 0; i < lpClipList->rdh.nCount; i++)
226226 {
227 - This->vertices[(i*4)+1].y = This->vertices[(i*4)+3].y = This->cliplist[i].left;
 227+ This->vertices[(i*4)+1].x = This->vertices[(i*4)+3].x = This->cliplist[i].left;
228228 This->vertices[i*4].x = This->vertices[(i*4)+2].x = This->cliplist[i].right;
229229 This->vertices[i*4].y = This->vertices[(i*4)+1].y = This->cliplist[i].top;
230230 This->vertices[(i*4)+2].y = This->vertices[(i*4)+3].y = This->cliplist[i].bottom;
Index: ddraw/glRenderer.cpp
@@ -1789,7 +1789,7 @@
17901790 This->util->SetCull(D3DCULL_NONE);
17911791 This->util->SetPolyMode(D3DFILL_SOLID);
17921792 This->ext->glDrawRangeElements(GL_TRIANGLES, 0, (6 * surface->clipper->clipsize) - 1,
1793 - 4 * surface->clipper->clipsize, GL_UNSIGNED_SHORT, surface->clipper->indices);
 1793+ 6 * surface->clipper->clipsize, GL_UNSIGNED_SHORT, surface->clipper->indices);
17941794 This->util->SetFBO((FBO*)NULL);
17951795 SetEvent(This->busy);
17961796 }