DXGL r147 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r146
|
r147
|
r148
>
Date:
01:13, 8 May 2012
Author:
admin
Status:
new
Tags:
Comment:
Add addsigned2x and subtract color ops
Fix texture ops caps bits
Modified paths:
/ddraw/glDirect3D.cpp
(modified) (
history
)
/ddraw/glDirect3DDevice.cpp
(modified) (
history
)
/ddraw/shadergen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3D.cpp
—
—
@@ -81,8 +81,9 @@
82
82
0.0f, //dvExtentsAdjust
83
83
0, //dwStencilCaps
84
84
8, //dwFVFCaps
85
- D3DTEXOPCAPS_SELECTARG1 | D3DTEXOPCAPS_SELECTARG2 | D3DTOP_MODULATE |
86
- D3DTOP_MODULATE2X | D3DTOP_MODULATE4X | D3DTOP_ADD, //dwTextureOpCaps
85
+ D3DTEXOPCAPS_SELECTARG1 | D3DTEXOPCAPS_SELECTARG2 | D3DTEXOPCAPS_MODULATE |
86
+ D3DTEXOPCAPS_MODULATE2X | D3DTEXOPCAPS_MODULATE4X | D3DTEXOPCAPS_ADD |
87
+ D3DTEXOPCAPS_ADDSIGNED | D3DTEXOPCAPS_ADDSIGNED2X | D3DTEXOPCAPS_SUBTRACT, //dwTextureOpCaps
87
88
8, //wMaxTextureBlendStages
88
89
8, //wMaxSimultaneousTextures
89
90
8, //dwMaxActiveLights
Index: ddraw/glDirect3DDevice.cpp
—
—
@@ -1176,6 +1176,8 @@
1177
1177
case D3DTOP_MODULATE4X:
1178
1178
case D3DTOP_ADD:
1179
1179
case D3DTOP_ADDSIGNED:
1180
+ case D3DTOP_ADDSIGNED2X:
1181
+ case D3DTOP_SUBTRACT:
1180
1182
break;
1181
1183
default:
1182
1184
return D3DERR_UNSUPPORTEDCOLOROPERATION;
Index: ddraw/shadergen.cpp
—
—
@@ -632,6 +632,12 @@
633
633
case D3DTOP_ADDSIGNED:
634
634
fsrc->append("color = " + arg1 + " + " + arg2 + " - .5;\n");
635
635
break;
636
+ case D3DTOP_ADDSIGNED2X:
637
+ fsrc->append("color = (" + arg1 + " + " + arg2 + " - .5) * 2.0;\n");
638
+ break;
639
+ case D3DTOP_SUBTRACT:
640
+ fsrc->append("color = " + arg1 + " - " + arg2 + ";\n");
641
+ break;
636
642
}
637
643
}
638
644
fsrc->append(op_colorfragout);
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