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
c312ff95
Commit
c312ff95
authored
Jun 04, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jun 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- do not search for attached surfaces if the texture doesn't have the
MIPMAP flag set - add GL crit. section support for matrix setting - support the various BLEND texture operations
parent
a8560196
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
12 deletions
+53
-12
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+38
-9
d3dtexture.c
dlls/ddraw/d3dtexture.c
+15
-3
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
c312ff95
...
...
@@ -1810,6 +1810,27 @@ GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface,
glTexEnvi
(
GL_TEXTURE_ENV
,
parm
,
GL_ADD_SIGNED_EXT
);
break
;
/* For the four blending modes, use the Arg2 parameter */
case
D3DTOP_BLENDDIFFUSEALPHA
:
case
D3DTOP_BLENDTEXTUREALPHA
:
case
D3DTOP_BLENDFACTORALPHA
:
case
D3DTOP_BLENDCURRENTALPHA
:
{
GLenum
src
=
GL_PRIMARY_COLOR_EXT
;
/* Just to prevent a compiler warning.. */
switch
(
dwState
)
{
case
D3DTOP_BLENDDIFFUSEALPHA
:
src
=
GL_PRIMARY_COLOR_EXT
;
case
D3DTOP_BLENDTEXTUREALPHA
:
src
=
GL_TEXTURE
;
case
D3DTOP_BLENDFACTORALPHA
:
src
=
GL_CONSTANT_EXT
;
case
D3DTOP_BLENDCURRENTALPHA
:
src
=
GL_PREVIOUS_EXT
;
}
glTexEnvi
(
GL_TEXTURE_ENV
,
parm
,
GL_INTERPOLATE_ARB
);
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_SOURCE2_RGB_EXT
,
src
);
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_OPERAND2_RGB_EXT
,
GL_SRC_ALPHA
);
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_SOURCE2_ALPHA_EXT
,
src
);
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_OPERAND2_ALPHA_EXT
,
GL_SRC_ALPHA
);
}
break
;
default
:
handled
=
FALSE
;
break
;
...
...
@@ -1969,7 +1990,9 @@ GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface,
}
if
((
dwState
&
0xFF
)
!=
D3DTTFF_DISABLE
)
{
LEAVE_GL
();
This
->
matrices_updated
(
This
,
TEXMAT0_CHANGED
<<
dwStage
);
ENTER_GL
();
}
if
(
handled
==
TRUE
)
{
...
...
@@ -2707,19 +2730,25 @@ d3ddevice_matrices_updated(IDirect3DDeviceImpl *This, DWORD matrices)
glThis
->
transform_state
=
GL_TRANSFORM_NONE
;
}
}
for
(
tex_mat
=
TEXMAT0_CHANGED
,
tex_stage
=
0
;
tex_mat
<=
TEXMAT7_CHANGED
;
tex_mat
<<=
1
,
tex_stage
++
)
{
if
(
matrices
&
tex_mat
)
{
if
(
This
->
state_block
.
texture_stage_state
[
tex_stage
][
D3DTSS_TEXTURETRANSFORMFLAGS
-
1
]
!=
D3DTTFF_DISABLE
)
{
if
(
tex_stage
==
0
)
{
/* No multi-texturing support for now ... */
if
(
matrices
&
(
TEXMAT0_CHANGED
|
TEXMAT1_CHANGED
|
TEXMAT2_CHANGED
|
TEXMAT3_CHANGED
|
TEXMAT4_CHANGED
|
TEXMAT5_CHANGED
|
TEXMAT6_CHANGED
|
TEXMAT7_CHANGED
))
{
ENTER_GL
();
for
(
tex_mat
=
TEXMAT0_CHANGED
,
tex_stage
=
0
;
tex_mat
<=
TEXMAT7_CHANGED
;
tex_mat
<<=
1
,
tex_stage
++
)
{
if
(
matrices
&
tex_mat
)
{
if
(
This
->
state_block
.
texture_stage_state
[
tex_stage
][
D3DTSS_TEXTURETRANSFORMFLAGS
-
1
]
!=
D3DTTFF_DISABLE
)
{
if
(
tex_stage
==
0
)
{
/* No multi-texturing support for now ... */
glMatrixMode
(
GL_TEXTURE
);
glLoadMatrixf
((
float
*
)
This
->
tex_mat
[
tex_stage
]);
}
}
else
{
glMatrixMode
(
GL_TEXTURE
);
glLoad
Matrixf
((
float
*
)
This
->
tex_mat
[
tex_stage
]
);
glLoad
Identity
(
);
}
}
else
{
glMatrixMode
(
GL_TEXTURE
);
glLoadIdentity
();
}
}
LEAVE_GL
();
}
}
...
...
dlls/ddraw/d3dtexture.c
View file @
c312ff95
...
...
@@ -585,7 +585,11 @@ gltex_upload_texture(IDirectDrawSurfaceImpl *This) {
}
}
surf_ptr
=
get_sub_mimaplevel
(
surf_ptr
);
if
(
surf_ptr
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
{
surf_ptr
=
get_sub_mimaplevel
(
surf_ptr
);
}
else
{
surf_ptr
=
NULL
;
}
}
return
DD_OK
;
...
...
@@ -817,8 +821,16 @@ GL_IDirect3DTextureImpl_2_1T_Load(LPDIRECT3DTEXTURE2 iface,
}
}
src_ptr
=
get_sub_mimaplevel
(
src_ptr
);
dst_ptr
=
get_sub_mimaplevel
(
dst_ptr
);
if
(
src_ptr
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
{
src_ptr
=
get_sub_mimaplevel
(
src_ptr
);
}
else
{
src_ptr
=
NULL
;
}
if
(
dst_ptr
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
{
dst_ptr
=
get_sub_mimaplevel
(
dst_ptr
);
}
else
{
dst_ptr
=
NULL
;
}
if
((
src_ptr
==
NULL
)
||
(
dst_ptr
==
NULL
))
{
if
(
src_ptr
!=
dst_ptr
)
{
...
...
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