DXGL r616 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r615
|
r616
|
r617
>
Date:
14:43, 24 September 2015
Author:
admin
Status:
new
Tags:
Comment:
Fix multi-backbuffer surface flipping.
Modified paths:
/ddraw/glDirectDrawSurface.cpp
(modified) (
history
)
/ddraw/glRenderer.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirectDrawSurface.cpp
—
—
@@ -410,7 +410,7 @@
411
411
for (int i = 0; i < backcount + 1; i++)
412
412
{
413
413
front->fliplist[i] = surface->texture;
414
- if (i < surface->ddsd.dwBackBufferCount) surface = surface->backbuffer;
414
+ if (i < backcount) surface = surface->backbuffer;
415
415
}
416
416
}
417
417
TRACE_EXIT(23, DD_OK);
Index: ddraw/glRenderer.cpp
—
—
@@ -3102,10 +3102,10 @@
3103
3103
{
3104
3104
int i, j, k;
3105
3105
int vsync = 0;
3106
- GLuint tmp = fliplist[0]->id;
3107
- MIPMAP tmp2[15];
3106
+ GLuint tmp;
3107
+ //MIPMAP tmp2[15];
3108
3108
int mipcount = fliplist[0]->ddsd.dwMipMapCount;
3109
- memcpy(&tmp2, &fliplist[0]->mipmaps, mipcount*sizeof(MIPMAP));
3109
+ //memcpy(&tmp2, &fliplist[0]->mipmaps, mipcount*sizeof(MIPMAP));
3110
3110
if (!mipcount) mipcount = 1;
3111
3111
for (k = 0; k < mipcount; k++)
3112
3112
{
—
—
@@ -3115,6 +3115,7 @@
3116
3116
}
3117
3117
for (i = 0; i < flips; i++)
3118
3118
{
3119
+ tmp = fliplist[0]->id;
3119
3120
for (j = 0; j < count-1; j++)
3120
3121
{
3121
3122
for (k = 0; k < mipcount; k++)
—
—
@@ -3126,6 +3127,12 @@
3127
3128
//memcpy(&fliplist[j]->mipmaps, &fliplist[j + 1]->mipmaps, mipcount*sizeof(MIPMAP));
3128
3129
fliplist[j]->id = fliplist[j + 1]->id;
3129
3130
}
3131
+ for (k = 0; k < mipcount; k++)
3132
+ {
3133
+ if (fliplist[count - 1]->mipmaps[k].dirty & 1)
3134
+ glTexture__Upload(fliplist[count - 1], k, FALSE, FALSE);
3135
+ fliplist[count - 1]->mipmaps[k].dirty |= 2;
3136
+ }
3130
3137
fliplist[count - 1]->id = tmp;
3131
3138
//memcpy(&fliplist[count - 1]->mipmaps, &tmp2, mipcount*sizeof(MIPMAP));
3132
3139
}
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