DXGL r901 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r900
|
r901
|
r902
>
Date:
23:11, 9 March 2019
Author:
admin
Status:
new
Tags:
Comment:
Draw 32-bit Z buffer to full range in DXGL Test.
Modified paths:
/dxglcfg/surfacegen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: dxglcfg/surfacegen.cpp
—
—
@@ -313,13 +313,26 @@
314
314
}
315
315
return;
316
316
case 32:
317
- for(y = 0; y < ddsd.dwHeight; y++)
317
+ if ((ddsd.ddpfPixelFormat.dwFlags & DDPF_ZBUFFER) && (ddsd.ddpfPixelFormat.dwZBitMask == 0xFFFFFFFF))
318
318
{
319
- for(x = 0; x < ddsd.dwWidth; x++)
319
+ for (y = 0; y < ddsd.dwHeight; y++)
320
320
{
321
- buffer32[x+((ddsd.lPitch/4)*y)] = (unsigned long)((x/(ddsd.dwWidth/4096.)) + 4096*floor((y/(ddsd.dwHeight/4096.))));
321
+ for (x = 0; x < ddsd.dwWidth; x++)
322
+ {
323
+ buffer32[x + ((ddsd.lPitch / 4) * y)] = (unsigned long)((x / (ddsd.dwWidth / 65536.)) + 65536 * floor((y / (ddsd.dwHeight / 65536.))));
324
+ }
322
325
}
323
326
}
327
+ else
328
+ {
329
+ for (y = 0; y < ddsd.dwHeight; y++)
330
+ {
331
+ for (x = 0; x < ddsd.dwWidth; x++)
332
+ {
333
+ buffer32[x + ((ddsd.lPitch / 4) * y)] = (unsigned long)((x / (ddsd.dwWidth / 4096.)) + 4096 * floor((y / (ddsd.dwHeight / 4096.))));
334
+ }
335
+ }
336
+ }
324
337
return;
325
338
default:
326
339
return;
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