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
85aa298a
Commit
85aa298a
authored
Jun 06, 2003
by
Raphael Junqueira
Committed by
Alexandre Julliard
Jun 06, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compilation problems.
parent
fb9d5c78
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
187 additions
and
59 deletions
+187
-59
d3d8_private.h
dlls/d3d8/d3d8_private.h
+3
-1
d3dcore_gl.h
dlls/d3d8/d3dcore_gl.h
+141
-23
device.c
dlls/d3d8/device.c
+2
-4
directx.c
dlls/d3d8/directx.c
+18
-3
utils.c
dlls/d3d8/utils.c
+23
-28
No files found.
dlls/d3d8/d3d8_private.h
View file @
85aa298a
...
...
@@ -194,8 +194,10 @@ typedef struct _GL_Info {
BOOL
supported
[
30
];
/**
ext
functions ptr */
/**
OpenGL EXT and ARB
functions ptr */
GL_EXT_FUNCS_GEN
;
/** OpenGL GLX functions ptr */
GLX_EXT_FUNCS_GEN
;
/**/
}
GL_Info
;
#undef USE_GL_FUNC
...
...
dlls/d3d8/d3dcore_gl.h
View file @
85aa298a
This diff is collapsed.
Click to expand it.
dlls/d3d8/device.c
View file @
85aa298a
...
...
@@ -34,8 +34,6 @@
/*#define GL_GLEXT_PROTOTYPES*/
/*#undef GLX_GLXEXT_LEGACY*/
#include "d3d8_private.h"
#include <GL/glext.h>
#include <GL/glxext.h>
/** currently desactiving 1_4 support as mesa doesn't implement all 1_4 support while defining it */
#undef GL_VERSION_1_4
...
...
@@ -1949,6 +1947,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_BeginScene(LPDIRECT3DDEVICE8 iface) {
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DDevice8Impl_EndScene
(
LPDIRECT3DDEVICE8
iface
)
{
IDirect3DBaseTexture8
*
cont
=
NULL
;
HRESULT
hr
;
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -1986,8 +1986,6 @@ HRESULT WINAPI IDirect3DDevice8Impl_EndScene(LPDIRECT3DDEVICE8 iface) {
vcheckGLcall
(
"glReadBuffer"
);
}
IDirect3DBaseTexture8
*
cont
=
NULL
;
HRESULT
hr
;
hr
=
IDirect3DSurface8_GetContainer
((
LPDIRECT3DSURFACE8
)
This
->
renderTarget
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
&
cont
);
if
(
SUCCEEDED
(
hr
)
&&
NULL
!=
cont
)
{
/** always dirtify for now. we must find a better way to see that surface have been modified */
...
...
dlls/d3d8/directx.c
View file @
85aa298a
...
...
@@ -600,7 +600,7 @@ HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D
pCaps
->
MaxPrimitiveCount
=
0xFFFFFFFF
;
pCaps
->
MaxVertexIndex
=
0xFFFFFFFF
;
pCaps
->
MaxStreams
=
2
;
/* HACK: Some games want at least 2 */
pCaps
->
MaxStreams
=
MAX_STREAMS
;
pCaps
->
MaxStreamStride
=
1024
;
#if 1
...
...
@@ -698,9 +698,14 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_texture_compression"
)
==
0
)
{
FIXME
(
" FOUND: ARB Texture Compression support
\n
"
);
This
->
gl_info
.
supported
[
ARB_TEXTURE_COMPRESSION
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_texture_env_combine"
)
==
0
)
{
FIXME
(
" FOUND: EXT Texture Env combine support
\n
"
);
This
->
gl_info
.
supported
[
ARB_TEXTURE_ENV_COMBINE
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_texture_env_dot3"
)
==
0
)
{
FIXME
(
" FOUND: EXT Dot3 support
\n
"
);
This
->
gl_info
.
supported
[
ARB_TEXTURE_ENV_DOT3
]
=
TRUE
;
if
(
FALSE
==
This
->
gl_info
.
supported
[
ARB_TEXTURE_ENV_DOT3
])
{
FIXME
(
" FOUND: EXT Dot3 support
\n
"
);
This
->
gl_info
.
supported
[
ARB_TEXTURE_ENV_DOT3
]
=
TRUE
;
}
}
else
if
(
strstr
(
ThisExtn
,
"GL_ARB_vertex_program"
))
{
This
->
gl_info
.
vs_arb_version
=
VS_VERSION_11
;
FIXME
(
" FOUND: ARB Vertex Shader support - version=%02x
\n
"
,
This
->
gl_info
.
vs_arb_version
);
...
...
@@ -724,6 +729,11 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
}
else
if
(
strcmp
(
ThisExtn
,
"GL_EXT_texture_compression_s3tc"
)
==
0
)
{
FIXME
(
" FOUND: EXT Texture S3TC compression support
\n
"
);
This
->
gl_info
.
supported
[
EXT_TEXTURE_COMPRESSION_S3TC
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_EXT_texture_env_dot3"
)
==
0
)
{
if
(
FALSE
==
This
->
gl_info
.
supported
[
ARB_TEXTURE_ENV_DOT3
])
{
FIXME
(
" FOUND: EXT Dot3 support
\n
"
);
This
->
gl_info
.
supported
[
ARB_TEXTURE_ENV_DOT3
]
=
TRUE
;
}
}
else
if
(
strcmp
(
ThisExtn
,
"GL_EXT_texture_filter_anisotropic"
)
==
0
)
{
FIXME
(
" FOUND: EXT Texture Anisotropic filter support
\n
"
);
This
->
gl_info
.
supported
[
EXT_TEXTURE_FILTER_ANISOTROPIC
]
=
TRUE
;
...
...
@@ -788,6 +798,11 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
if
(
*
GLX_Extensions
==
' '
)
GLX_Extensions
++
;
}
}
#define USE_GL_FUNC(type, pfn) This->gl_info.pfn = (type) glXGetProcAddressARB(#pfn);
GLX_EXT_FUNCS_GEN
;
#undef USE_GL_FUNC
}
HRESULT
WINAPI
IDirect3D8Impl_CreateDevice
(
LPDIRECT3D8
iface
,
...
...
dlls/d3d8/utils.c
View file @
85aa298a
...
...
@@ -536,16 +536,16 @@ void GetSrcAndOpFromValue(DWORD iValue, BOOL isAlphaArg, GLenum* source, GLenum*
/* Set texture operations up - The following avoids lots of ifdefs in this routine!*/
#if defined (GL_VERSION_1_3)
#
define useext(A) A
#
define combine_ext 1
#
define useext(A) A
#
define combine_ext 1
#elif defined (GL_EXT_texture_env_combine)
#
define useext(A) A##_EXT
#
define combine_ext 1
#
define useext(A) A##_EXT
#
define combine_ext 1
#elif defined (GL_ARB_texture_env_combine)
#
define useext(A) A##_ARB
#
define combine_ext 1
#
define useext(A) A##_ARB
#
define combine_ext 1
#else
#
undef combine_ext
#
undef combine_ext
#endif
#if !defined(combine_ext)
...
...
@@ -579,7 +579,7 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
opr0_target
=
useext
(
GL_OPERAND0_ALPHA
);
opr1_target
=
useext
(
GL_OPERAND1_ALPHA
);
opr2_target
=
useext
(
GL_OPERAND2_ALPHA
);
scal_target
=
useext
(
GL_ALPHA_SCALE
)
;
scal_target
=
GL_ALPHA_SCALE
;
}
else
{
comb_target
=
useext
(
GL_COMBINE_RGB
);
...
...
@@ -713,8 +713,8 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 2"
);
break
;
case
D3DTOP_SUBTRACT
:
#if defined(GL_VERSION_1_3) || defined (GL_ARB_texture_env_combine)
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_SUBTRACT
)
);
if
(
GL_SUPPORT
(
ARB_TEXTURE_ENV_COMBINE
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_SUBTRACT
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_SUBTRACT)"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
...
...
@@ -726,10 +726,11 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
scal_target
,
1
);
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
#else
}
else
{
FIXME
(
"This version of opengl does not support GL_SUBTRACT
\n
"
);
#endif
break
;
}
break
;
case
D3DTOP_BLENDDIFFUSEALPHA
:
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
useext
(
GL_INTERPOLATE
));
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, useext(GL_INTERPOLATE)"
);
...
...
@@ -741,7 +742,7 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
GL_PRIMARY_COLOR
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
useext
(
GL_PRIMARY_COLOR
)
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, GL_PRIMARY_COLOR"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
GL_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, GL_SRC_ALPHA"
);
...
...
@@ -777,7 +778,7 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
GL_CONSTANT
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
useext
(
GL_CONSTANT
)
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, GL_CONSTANT"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
GL_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, GL_SRC_ALPHA"
);
...
...
@@ -795,7 +796,7 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, src1_target, src2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr1_target
,
opr2
);
checkGLcall
(
"GL_TEXTURE_ENV, opr1_target, opr2"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
GL_PREVIOUS
);
glTexEnvi
(
GL_TEXTURE_ENV
,
src2_target
,
useext
(
GL_PREVIOUS
)
);
checkGLcall
(
"GL_TEXTURE_ENV, src2_target, GL_PREVIOUS"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr2_target
,
GL_SRC_ALPHA
);
checkGLcall
(
"GL_TEXTURE_ENV, opr2_target, GL_SRC_ALPHA"
);
...
...
@@ -803,18 +804,12 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o
checkGLcall
(
"GL_TEXTURE_ENV, scal_target, 1"
);
break
;
case
D3DTOP_DOTPRODUCT3
:
#if defined(GL_EXT_texture_env_dot3)
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_DOT3_RGBA_EXT
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA_EXT"
);
#elif defined(GL_ARB_texture_env_dot3)
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_DOT3_RGBA_ARB
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA_ARB"
);
#elif defined (GL_VERSION_1_3)
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_DOT3_RGBA
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA"
);
#else
FIXME
(
"This version of opengl does not support GL_DOT3
\n
"
);
#endif
if
(
GL_SUPPORT
(
ARB_TEXTURE_ENV_DOT3
))
{
glTexEnvi
(
GL_TEXTURE_ENV
,
comb_target
,
GL_DOT3_RGBA
);
checkGLcall
(
"GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA"
);
}
else
{
FIXME
(
"This version of opengl does not support GL_DOT3
\n
"
);
}
glTexEnvi
(
GL_TEXTURE_ENV
,
src0_target
,
src1
);
checkGLcall
(
"GL_TEXTURE_ENV, src0_target, src1"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
opr0_target
,
opr1
);
...
...
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