DXGL r673 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r672
|
r673
|
r674
>
Date:
00:26, 24 July 2016
Author:
admin
Status:
new
Tags:
Comment:
Fix regression from
r672
, wasn't supposed to be flipped in the first place.
Modified paths:
/ddraw/glRenderer.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glRenderer.cpp
—
—
@@ -1936,6 +1936,7 @@
1937
1937
glTexture *ztexture = NULL;
1938
1938
GLint zlevel = 0;
1939
1939
GLfloat mulx, muly;
1940
+ GLsizei x1, y1, x2, y2;
1940
1941
if (cmd->zbuffer)
1941
1942
{
1942
1943
ztexture = cmd->zbuffer;
—
—
@@ -1974,13 +1975,15 @@
1975
1976
if (cmd->targetlevel == 0 && (cmd->target->levels[0].ddsd.dwWidth != cmd->target->bigwidth) ||
1976
1977
(cmd->target->levels[0].ddsd.dwHeight != cmd->target->bigheight))
1977
1978
{
1978
- mulx = cmd->target->bigwidth / cmd->target->levels[0].ddsd.dwWidth;
1979
- muly = cmd->target->bigheight / cmd->target->levels[0].ddsd.dwHeight;
1979
+ mulx = (GLfloat)cmd->target->bigwidth / (GLfloat)cmd->target->levels[0].ddsd.dwWidth;
1980
+ muly = (GLfloat)cmd->target->bigheight / (GLfloat)cmd->target->levels[0].ddsd.dwHeight;
1980
1981
for (DWORD i = 0; i < cmd->dwCount; i++)
1981
1982
{
1982
- glUtil_SetScissor(This->util, TRUE, cmd->lpRects[i].x1*mulx,
1983
- (cmd->target->bigheight - (GLsizei)((GLfloat)cmd->lpRects[i].y1*muly)),
1984
- cmd->lpRects[i].x2*mulx, (cmd->target->bigheight - ((GLfloat)cmd->lpRects[i].y2*muly)));
1983
+ x1 = (GLsizei)((GLfloat)cmd->lpRects[i].x1) * mulx;
1984
+ x2 = ((GLsizei)((GLfloat)cmd->lpRects[i].x2) * mulx) - x1;
1985
+ y1 = (GLsizei)((GLfloat)cmd->lpRects[i].y1) * muly;
1986
+ y2 = ((GLsizei)((GLfloat)cmd->lpRects[i].y2) * muly) - y1;
1987
+ glUtil_SetScissor(This->util, TRUE, x1, y1, x2, y2);
1985
1988
glClear(clearbits);
1986
1989
}
1987
1990
}
—
—
@@ -1988,10 +1991,8 @@
1989
1992
{
1990
1993
for (DWORD i = 0; i < cmd->dwCount; i++)
1991
1994
{
1992
- glUtil_SetScissor(This->util, TRUE, cmd->lpRects[i].x1,
1993
- cmd->target->levels[cmd->targetlevel].ddsd.dwHeight - cmd->lpRects[i].y1,
1994
- cmd->lpRects[i].x2,
1995
- cmd->target->levels[cmd->targetlevel].ddsd.dwHeight - cmd->lpRects[i].y2);
1995
+ glUtil_SetScissor(This->util, TRUE, cmd->lpRects[i].x1, cmd->lpRects[i].y1,
1996
+ (cmd->lpRects[i].x2 - cmd->lpRects[i].x1), cmd->lpRects[i].y2 - cmd->lpRects[i].y1);
1996
1997
glClear(clearbits);
1997
1998
}
1998
1999
}
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r672
Isolate glRenderer__Clear from DDraw surface structure....
admin
23:19, 23 July 2016
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