DXGL r620 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r619
|
r620
|
r621
>
Date:
20:37, 27 September 2015
Author:
admin
Status:
new
Tags:
Comment:
Fix resizing 8-bit backbuffer.
Modified paths:
/ddraw/glRenderer.cpp
(modified) (
history
)
/ddraw/glTexture.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glRenderer.cpp
—
—
@@ -1744,6 +1744,7 @@
1745
1745
{
1746
1746
DDSURFACEDESC2 ddsd = ddsdBackbuffer;
1747
1747
GLfloat view[4];
1748
+ DDSURFACEDESC2 tmpddsd;
1748
1749
glUtil_SetActiveTexture(This->util,0);
1749
1750
if(!This->backbuffer)
1750
1751
{
—
—
@@ -1755,7 +1756,12 @@
1756
1757
}
1757
1758
if((This->backx != x) || (This->backy != y))
1758
1759
{
1759
- glTexture__Upload(This->backbuffer, 0, FALSE, TRUE);
1760
+ tmpddsd = This->backbuffer->ddsd;
1761
+ tmpddsd.dwSize = sizeof(DDSURFACEDESC2);
1762
+ tmpddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT;
1763
+ tmpddsd.dwWidth = x;
1764
+ tmpddsd.dwHeight = y;
1765
+ glTexture__Modify(This->backbuffer, &tmpddsd, x, y, FALSE);
1760
1766
This->backx = x;
1761
1767
This->backy = y;
1762
1768
}
—
—
@@ -2633,6 +2639,7 @@
2634
2640
(cmd->dest->ddsd.dwHeight != cmd->dest->dummycolor->ddsd.dwHeight))
2635
2641
{
2636
2642
tmpddsd = cmd->dest->ddsd;
2643
+ tmpddsd.dwSize = sizeof(DDSURFACEDESC2);
2637
2644
tmpddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT;
2638
2645
tmpddsd.dwWidth = cmd->dest->ddsd.dwWidth;
2639
2646
tmpddsd.dwHeight = cmd->dest->ddsd.dwHeight;
Index: ddraw/glTexture.cpp
—
—
@@ -598,11 +598,12 @@
599
599
if (!(ddsd->dwFlags & DDSD_PITCH))
600
600
{
601
601
if (ddsd->dwFlags & DDSD_PIXELFORMAT)
602
- texture->ddsd.lPitch = NextMultipleOf4(ddsd->dwWidth *
602
+ texture->ddsd.lPitch = texture->mipmaps[0].pitch = NextMultipleOf4(ddsd->dwWidth *
603
603
(NextMultipleOf8(ddsd->ddpfPixelFormat.dwRGBBitCount) / 8));
604
- else texture->ddsd.lPitch = NextMultipleOf4(ddsd->dwWidth *
604
+ else texture->ddsd.lPitch = texture->mipmaps[0].pitch = NextMultipleOf4(ddsd->dwWidth *
605
605
(NextMultipleOf8(texture->ddsd.ddpfPixelFormat.dwRGBBitCount) / 8));
606
606
}
607
+ if(bigx) texture->mipmaps[0].bigx = bigx;
607
608
resize = TRUE;
608
609
}
609
610
}
—
—
@@ -619,6 +620,7 @@
620
621
if (ddsd->dwHeight != texture->ddsd.dwHeight)
621
622
{
622
623
texture->ddsd.dwHeight = texture->mipmaps[0].height = ddsd->dwHeight;
624
+ if (bigy) texture->mipmaps[0].bigy = bigy;
623
625
resize = TRUE;
624
626
}
625
627
}
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