DXGL r180 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r179
|
r180
|
r181
>
Date:
17:51, 24 June 2012
Author:
admin
Status:
new
Tags:
Comment:
Fix another mistake and add depth write state.
Modified paths:
/ddraw/glRenderer.cpp
(modified) (
history
)
/ddraw/glutil.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glRenderer.cpp
—
—
@@ -1315,6 +1315,8 @@
1316
1316
device->SetDepthComp();
1317
1317
if(device->renderstate[D3DRENDERSTATE_ZENABLE]) DepthTest(true);
1318
1318
else DepthTest(false);
1319
+ if(device->renderstate[D3DRENDERSTATE_ZWRITEENABLE]) DepthWrite(true);
1320
+ else DepthWrite(false);
1319
1321
_GENSHADER prog = genshaders[current_genshader].shader;
1320
1322
glEnableVertexAttribArray(prog.attribs[0]);
1321
1323
glVertexAttribPointer(prog.attribs[0],3,GL_FLOAT,false,vertices[0].stride,vertices[0].data);
—
—
@@ -1475,6 +1477,7 @@
1476
1478
if(device->glDDS7->zbuffer) SetFBO(device->glDDS7->texture,device->glDDS7->zbuffer->texture,device->glDDS7->zbuffer->hasstencil);
1477
1479
else SetFBO(device->glDDS7->texture,0,false);
1478
1480
glViewport(device->viewport.dwX,device->viewport.dwY,device->viewport.dwWidth,device->viewport.dwHeight);
1481
+ glDepthRange(device->viewport.dvMinZ,device->viewport.dvMaxZ);
1479
1482
if(indices) glDrawElements(mode,indexcount,GL_UNSIGNED_SHORT,indices);
1480
1483
else glDrawArrays(mode,0,count);
1481
1484
if(device->glDDS7->zbuffer) device->glDDS7->zbuffer->dirty |= 2;
Index: ddraw/glutil.cpp
—
—
@@ -177,8 +177,8 @@
178
178
if(enabled != depthtest)
179
179
{
180
180
depthtest = enabled;
181
- if(depthtest) glEnable(
182
- else glDepthMask(GL_FALSE);
181
+ if(depthtest) glEnable(GL_DEPTH_TEST);
182
+ else glDisable(GL_DEPTH_TEST);
183
183
}
184
184
}
185
185
void SetDepthComp(GLenum comp)
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