Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f8f7cdf0
Commit
f8f7cdf0
authored
May 15, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
May 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solved the transparency problem seen in the ClipMirror SDK sample
properly. Also a few tabs->spaces to correct formatting.
parent
6c5e8722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
44 deletions
+12
-44
device.c
dlls/d3d8/device.c
+12
-44
No files found.
dlls/d3d8/device.c
View file @
f8f7cdf0
...
...
@@ -3833,8 +3833,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
int
operand
=
GL_SRC_COLOR
;
int
source
=
GL_TEXTURE
;
GetSrcAndOpFromValue
(
Value
,
isAlphaArg
,
&
source
,
&
operand
);
GetSrcAndOpFromValue
(
Value
,
isAlphaArg
,
&
source
,
&
operand
);
if
(
isAlphaArg
)
{
/* From MSDN (D3DTSS_ALPHAARG1) :
The default argument is D3DTA_TEXTURE. If no texture is set for this stage,
then the default argument is D3DTA_DIFFUSE.
FIXME? If texture added/removed, may need to reset back as well? */
if
(
Type
==
D3DTSS_ALPHAARG1
&&
This
->
StateBlock
->
textures
[
Stage
]
==
NULL
&&
Value
==
D3DTA_TEXTURE
)
{
GetSrcAndOpFromValue
(
D3DTA_DIFFUSE
,
isAlphaArg
,
&
source
,
&
operand
);
}
TRACE
(
"Source %x = %x, Operand %x = %x
\n
"
,
SOURCEx_ALPHA_EXT
(
Type
),
source
,
OPERANDx_ALPHA_EXT
(
Type
),
operand
);
glTexEnvi
(
GL_TEXTURE_ENV
,
SOURCEx_ALPHA_EXT
(
Type
),
source
);
vcheckGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, SOURCEx_ALPHA_EXT, source);"
);
...
...
@@ -3906,50 +3914,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
break
;
case
D3DTOP_SELECTARG1
:
{
/*FIXME("see if D3DTOP_SELECTARG1 behavior is correct now!\n");*/
{
glTexEnvi
(
GL_TEXTURE_ENV
,
Parm
,
GL_REPLACE
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_REPLACE)"
);
#if 0 /* don't seem to do anything */
{
BOOL isAlphaOp = (Type == D3DTSS_ALPHAOP);
DWORD dwValue = 0;
GLenum source;
GLenum operand;
dwValue = This->StateBlock->texture_state[Stage][(isAlphaOp) ? D3DTSS_ALPHAARG1 : D3DTSS_COLORARG1];
GetSrcAndOpFromValue(dwValue, isAlphaOp, &source, &operand);
if (isAlphaOp) {
TRACE("Source %x = %x, Operand %x = %x\n", GL_SOURCE0_ALPHA_EXT, source, GL_OPERAND0_ALPHA_EXT, operand);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, source);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, 'source')");
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_EXT, operand);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_EXT, 'operand')");
} else {
TRACE("Source %x = %x, Operand %x = %x\n", GL_SOURCE0_RGB_EXT, source, GL_OPERAND0_RGB_EXT, operand);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, source);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, 'source')");
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, operand);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, 'operand')");
}
dwValue = This->StateBlock->texture_state[Stage][(isAlphaOp) ? D3DTSS_ALPHAARG2 : D3DTSS_COLORARG2];
GetSrcAndOpFromValue(dwValue, isAlphaOp, &source, &operand);
if (isAlphaOp) {
TRACE("Source %x = %x, Operand %x = %x\n", GL_SOURCE1_ALPHA_EXT, source, GL_OPERAND1_ALPHA_EXT, operand);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_EXT, source);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_EXT, 'source')");
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_EXT, operand);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_EXT, 'operand')");
} else {
TRACE("Source %x = %x, Operand %x = %x\n", GL_SOURCE1_RGB_EXT, source, GL_OPERAND1_RGB_EXT, operand);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, source);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, 'source')");
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, operand);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, 'operand')");
}
}
#endif
}
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_REPLACE)"
);
}
break
;
case
D3DTOP_SELECTARG2
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment