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
50fbe733
Commit
50fbe733
authored
Aug 05, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Aug 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support the mimap lod bias extension.
parent
d098f55d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
2 deletions
+26
-2
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+15
-2
gl_api.h
dlls/ddraw/gl_api.h
+1
-0
gl_private.h
dlls/ddraw/gl_private.h
+3
-0
mesa.c
dlls/ddraw/mesa.c
+6
-0
mesa_private.h
dlls/ddraw/mesa_private.h
+1
-0
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
50fbe733
...
...
@@ -1953,11 +1953,12 @@ GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface,
D3DVALUE
value
=
*
((
D3DVALUE
*
)
&
dwState
);
BOOLEAN
handled
=
TRUE
;
if
(
value
!=
0
.
0
)
if
(
(
value
!=
0
.
0
)
&&
(
GL_extensions
.
mipmap_lodbias
==
FALSE
)
)
handled
=
FALSE
;
if
(
handled
)
{
TRACE
(
" Stage type : D3DTSS_MIPMAPLODBIAS => %f
\n
"
,
value
);
glTexEnvf
(
GL_TEXTURE_FILTER_CONTROL_WINE
,
GL_TEXTURE_LOD_BIAS_WINE
,
value
);
}
else
{
FIXME
(
" Unhandled stage type : D3DTSS_MIPMAPLODBIAS => %f
\n
"
,
value
);
}
...
...
@@ -3770,7 +3771,11 @@ static void fill_opengl_primcaps(D3DPRIMCAPS *pc)
pc
->
dwMiscCaps
=
D3DPMISCCAPS_CONFORMANT
|
D3DPMISCCAPS_CULLCCW
|
D3DPMISCCAPS_CULLCW
|
D3DPMISCCAPS_LINEPATTERNREP
|
D3DPMISCCAPS_MASKPLANES
|
D3DPMISCCAPS_MASKZ
;
pc
->
dwRasterCaps
=
D3DPRASTERCAPS_DITHER
|
D3DPRASTERCAPS_FOGRANGE
|
D3DPRASTERCAPS_FOGTABLE
|
D3DPRASTERCAPS_FOGVERTEX
|
D3DPRASTERCAPS_STIPPLE
|
D3DPRASTERCAPS_ZBIAS
|
D3DPRASTERCAPS_ZTEST
|
D3DPRASTERCAPS_SUBPIXEL
;
D3DPRASTERCAPS_FOGVERTEX
|
D3DPRASTERCAPS_STIPPLE
|
D3DPRASTERCAPS_ZBIAS
|
D3DPRASTERCAPS_ZTEST
|
D3DPRASTERCAPS_SUBPIXEL
|
D3DPRASTERCAPS_ZFOG
;
if
(
GL_extensions
.
mipmap_lodbias
==
TRUE
)
{
pc
->
dwRasterCaps
|=
D3DPRASTERCAPS_MIPMAPLODBIAS
;
}
pc
->
dwZCmpCaps
=
D3DPCMPCAPS_ALWAYS
|
D3DPCMPCAPS_EQUAL
|
D3DPCMPCAPS_GREATER
|
D3DPCMPCAPS_GREATEREQUAL
|
D3DPCMPCAPS_LESS
|
D3DPCMPCAPS_LESSEQUAL
|
D3DPCMPCAPS_NEVER
|
D3DPCMPCAPS_NOTEQUAL
;
pc
->
dwSrcBlendCaps
=
D3DPBLENDCAPS_ZERO
|
D3DPBLENDCAPS_ONE
|
D3DPBLENDCAPS_DESTCOLOR
|
D3DPBLENDCAPS_INVDESTCOLOR
|
...
...
@@ -3939,6 +3944,14 @@ d3ddevice_init_at_startup(void *gl_handle)
GL_extensions
.
mirrored_repeat
=
TRUE
;
}
/* Texture LOD Bias :
- GL_EXT_texture_lod_bias
*/
if
(
strstr
(
glExtensions
,
"GL_EXT_texture_lod_bias"
))
{
TRACE
(
" - texture lod bias
\n
"
);
GL_extensions
.
mipmap_lodbias
=
TRUE
;
}
/* Fill the D3D capabilities according to what GL tells us... */
fill_caps
();
...
...
dlls/ddraw/gl_api.h
View file @
50fbe733
...
...
@@ -91,6 +91,7 @@ GL_API_FUNCTION(glStencilMask)
GL_API_FUNCTION
(
glStencilOp
)
GL_API_FUNCTION
(
glTexCoord2f
)
GL_API_FUNCTION
(
glTexCoord2fv
)
GL_API_FUNCTION
(
glTexEnvf
)
GL_API_FUNCTION
(
glTexEnvfv
)
GL_API_FUNCTION
(
glTexEnvi
)
GL_API_FUNCTION
(
glTexImage2D
)
...
...
dlls/ddraw/gl_private.h
View file @
50fbe733
...
...
@@ -55,6 +55,8 @@
Note: this is perfectly 'legal' as the three variants of the enum have exactly the same value
*/
#define GL_MIRRORED_REPEAT_WINE 0x8370
#define GL_TEXTURE_FILTER_CONTROL_WINE 0x8500
#define GL_TEXTURE_LOD_BIAS_WINE 0x8501
#ifndef GLPRIVATE_NO_REDEFINE
...
...
@@ -123,6 +125,7 @@
#define glStencilOp pglStencilOp
#define glTexCoord2f pglTexCoord2f
#define glTexCoord2fv pglTexCoord2fv
#define glTexEnvf pglTexEnvf
#define glTexEnvfv pglTexEnvfv
#define glTexEnvi pglTexEnvi
#define glTexImage2D pglTexImage2D
...
...
dlls/ddraw/mesa.c
View file @
50fbe733
...
...
@@ -400,6 +400,12 @@ void set_render_state(IDirect3DDeviceImpl* This,
glThis
->
blending
=
dwRenderState
;
break
;
case
D3DRENDERSTATE_MIPMAPLODBIAS
:
/* 46 */
IDirect3DDevice7_SetTextureStageState
(
ICOM_INTERFACE
(
This
,
IDirect3DDevice7
),
0
,
D3DTSS_MIPMAPLODBIAS
,
dwRenderState
);
break
;
case
D3DRENDERSTATE_ZBIAS
:
/* 47 */
/* This is a tad bit hacky.. But well, no idea how to do it better in OpenGL :-/ */
if
(
dwRenderState
==
0
)
{
...
...
dlls/ddraw/mesa_private.h
View file @
50fbe733
...
...
@@ -162,6 +162,7 @@ typedef struct {
typedef
struct
{
/* Mirrored Repeat */
BOOLEAN
mirrored_repeat
;
BOOLEAN
mipmap_lodbias
;
}
GL_EXTENSIONS_LIST
;
extern
GL_EXTENSIONS_LIST
GL_extensions
;
...
...
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