DXGL r331 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r330
|
r331
|
r332
>
Date:
01:38, 22 February 2013
Author:
admin
Status:
new
Tags:
Comment:
Add a couple viewport variables.
Adjust D3DTLVERTEX pixel coordinates to half-pixel positions.
Modified paths:
/ddraw/glDirect3DViewport.cpp
(modified) (
history
)
/ddraw/shadergen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3DViewport.cpp
—
—
@@ -294,6 +294,8 @@
295
295
vp.dvClipX = viewport.dvClipX;
296
296
vp.dvClipY = viewport.dvClipY;
297
297
viewport = vp;
298
+ maxX = lpData->dvMaxX;
299
+ maxY = lpData->dvMaxY;
298
300
scaleX = lpData->dvScaleX;
299
301
scaleY = lpData->dvScaleY;
300
302
if(current && device) Sync();
Index: ddraw/shadergen.cpp
—
—
@@ -280,7 +280,7 @@
281
281
gl_Position = vec4(pos.x,-pos.y,pos.z,pos.w);\n";
282
282
static const char op_normalize[] = "N = normalize(gl_NormalMatrix*nxyz);\n";
283
283
static const char op_normalpassthru[] = "N = gl_NormalMatrix*nxyz;\n";
284
-static const char op_passthru[] = "gl_Position = vec4(((xyz.x)/(width/2.0))-1.0,((xyz.y)/(height/2.0))-1.0,(xyz.z),1.0);\n";
284
+static const char op_passthru[] = "gl_Position = vec4(((xyz.x+.5)/(width/2.0))-1.0,((xyz.y+.5)/(height/2.0))-1.0,(xyz.z),1.0);\n";
285
285
static const char op_resetcolor[] = "diffuse = specular = vec4(0.0);\n\
286
286
ambient = ambientcolor / 255.0;\n";
287
287
static const char op_dirlight[] = "DirLight(lightX);\n";
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