Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5b75c15b
Commit
5b75c15b
authored
May 28, 2004
by
Christian Costa
Committed by
Alexandre Julliard
May 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented some texture operations using ATI_texture_env_combine3.
Fixed D3DTOP_LERP. Fixed some checkGLcall error messages.
parent
0a5f3934
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
173 additions
and
11 deletions
+173
-11
d3dcore_gl.h
dlls/d3d8/d3dcore_gl.h
+9
-0
utils.c
dlls/d3d8/utils.c
+164
-11
No files found.
dlls/d3d8/d3dcore_gl.h
View file @
5b75c15b
...
...
@@ -594,6 +594,15 @@ typedef void (APIENTRY * PGLFNGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage,
#define GL_SIGNED_HILO8_NV 0x885F
#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
#endif
/* GL_ATI_texture_env_combine3 */
#ifndef GL_ATI_texture_env_combine3
#define GL_ATI_texture_env_combine3 1
#define GL_MODULATE_ADD_ATI 0x8744
#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
#define GL_MODULATE_SUBTRACT_ATI 0x8746
/* #define ONE */
/* #define ZERO */
#endif
/*******
* OpenGL Official Version
...
...
dlls/d3d8/utils.c
View file @
5b75c15b
...
...
@@ -1360,9 +1360,9 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_REPLACE
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_REPLACE"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
GL_PREVIOUS_EXT
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target,
src1
"
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target,
GL_PREVIOUS_EXT
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
GL_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target,
opr1
"
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target,
GL_SRC_ALPHA
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
break
;
...
...
@@ -1562,10 +1562,10 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
break
;
case
D3DTOP_DOTPRODUCT3
:
if
(
GL_SUPPORT
(
ARB_TEXTURE_ENV_DOT3
))
{
if
(
GL_SUPPORT
(
ARB_TEXTURE_ENV_DOT3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_DOT3_RGBA_ARB
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA_ARB"
);
}
else
if
(
GL_SUPPORT
(
EXT_TEXTURE_ENV_DOT3
))
{
}
else
if
(
GL_SUPPORT
(
EXT_TEXTURE_ENV_DOT3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_DOT3_RGBA_EXT
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA_EXT"
);
}
else
{
...
...
@@ -1586,20 +1586,173 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_INTERPOLATE
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_INTERPOLATE)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src
2
"
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src
1
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, opr
2
"
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, opr
1
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src2
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src
3
"
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src
2
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr
3
"
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr
2
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src3
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src
1
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
src
3
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target,
src1
"
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src
3
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
opr
3
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target,
opr3
"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
break
;
case
D3DTOP_ADDSMOOTH
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
switch
(
opr1
)
{
case
GL_SRC_COLOR
:
opr
=
GL_ONE_MINUS_SRC_COLOR
;
break
;
case
GL_ONE_MINUS_SRC_COLOR
:
opr
=
GL_SRC_COLOR
;
break
;
case
GL_SRC_ALPHA
:
opr
=
GL_ONE_MINUS_SRC_ALPHA
;
break
;
case
GL_ONE_MINUS_SRC_ALPHA
:
opr
=
GL_SRC_ALPHA
;
break
;
}
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
opr
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, opr"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src2
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
case
D3DTOP_BLENDTEXTUREALPHAPM
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
GL_TEXTURE
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, GL_TEXTURE"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
GL_ONE_MINUS_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, GL_ONE_MINUS_SRC_APHA"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src2
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
case
D3DTOP_MODULATEALPHA_ADDCOLOR
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
GL_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, GL_SRC_APHA"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src2
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
case
D3DTOP_MODULATECOLOR_ADDALPHA
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
GL_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, GL_SRC_ALPHA"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
case
D3DTOP_MODULATEINVALPHA_ADDCOLOR
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
GL_ONE_MINUS_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, GL_ONE_MINUS_SRC_APHA"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src2
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
case
D3DTOP_MODULATEINVCOLOR_ADDALPHA
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
GL_ONE_MINUS_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, GL_ONE_MINUS_SRC_ALPHA"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
case
D3DTOP_MULTIPLYADD
:
if
(
GL_SUPPORT
(
ATI_TEXTURE_ENV_COMBINE3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_MODULATE_ADD_ATI
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_MODULATE_ADD_ATI)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src3
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src3"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
opr3
);
checkGLcall
(
"GL_TEXTURE_ENV, opr0_target, opr3"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src1_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr1
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
src2
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
}
else
Handled
=
FALSE
;
break
;
default:
Handled
=
FALSE
;
}
...
...
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