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
18af8d86
Commit
18af8d86
authored
May 08, 2003
by
Raphael Junqueira
Committed by
Alexandre Julliard
May 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Disable some 'classic' debug traces (avoid useless flood of traces
while debugging games). - Fix the texture size caps using GL_MAX_TEXTURE_SIZE.
parent
3270641c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
19 deletions
+38
-19
basetexture.c
dlls/d3d8/basetexture.c
+1
-1
d3d8_private.h
dlls/d3d8/d3d8_private.h
+9
-0
device.c
dlls/d3d8/device.c
+15
-16
directx.c
dlls/d3d8/directx.c
+13
-2
No files found.
dlls/d3d8/basetexture.c
View file @
18af8d86
...
...
@@ -100,7 +100,7 @@ void WINAPI IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8
}
D3DRESOURCETYPE
WINAPI
IDirect3DBaseTexture8Impl_GetType
(
LPDIRECT3DBASETEXTURE8
iface
)
{
ICOM_THIS
(
IDirect3DBaseTexture8Impl
,
iface
);
TRACE
(
"(%p) : returning %d
\n
"
,
This
,
This
->
ResourceType
);
/*TRACE("(%p) : returning %d\n", This, This->ResourceType);*/
return
This
->
ResourceType
;
}
...
...
dlls/d3d8/d3d8_private.h
View file @
18af8d86
...
...
@@ -142,6 +142,15 @@ void CreateStateBlock(LPDIRECT3DDEVICE8 iface);
TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
} \
}
#define vcheckGLcall(A) \
{ \
GLint err = glGetError(); \
if (err != GL_NO_ERROR) { \
FIXME(">>>>>>>>>>>>>>>>> %x from %s @ %s / %d\n", err, A, __FILE__, __LINE__); \
} else { \
VTRACE(("%s call ok %s / %d\n", A, __FILE__, __LINE__)); \
} \
}
#define checkGLSupport(ExtName) FALSE
/*(TRUE == This->direct3d8->glInfo.supported[ExtName])*/
#define GLExtCall(FuncName)
/*(This->direct3d8->glInfo.FuncName)*/
...
...
dlls/d3d8/device.c
View file @
18af8d86
...
...
@@ -3278,17 +3278,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
}
/* Make appropriate texture active */
TRACE
(
"Activating appropriate texture state %ld
\n
"
,
Stage
);
VTRACE
((
"Activating appropriate texture state %ld
\n
"
,
Stage
)
);
if
(
This
->
isMultiTexture
)
{
#if defined(GL_VERSION_1_3)
glActiveTexture
(
GL_TEXTURE0
+
Stage
);
checkGLcall
(
"glActiveTexture"
);
v
checkGLcall
(
"glActiveTexture"
);
#else
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
Stage
);
checkGLcall
(
"glActiveTextureARB"
);
v
checkGLcall
(
"glActiveTextureARB"
);
#endif
}
else
if
(
Stage
>
0
)
{
}
else
if
(
Stage
>
0
)
{
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesnt support
\n
"
);
}
...
...
@@ -3424,15 +3423,15 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
if
(
isAlphaArg
)
{
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
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, SOURCEx_ALPHA_EXT, source);"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, SOURCEx_ALPHA_EXT, source);"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
OPERANDx_ALPHA_EXT
(
Type
),
operand
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, OPERANDx_ALPHA_EXT, operand);"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, OPERANDx_ALPHA_EXT, operand);"
);
}
else
{
TRACE
(
"Source %x = %x, Operand %x = %x
\n
"
,
SOURCEx_RGB_EXT
(
Type
),
source
,
OPERANDx_RGB_EXT
(
Type
),
operand
);
glTexEnvi
(
GL_TEXTURE_ENV
,
SOURCEx_RGB_EXT
(
Type
),
source
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, SOURCEx_RGB_EXT, source);"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, SOURCEx_RGB_EXT, source);"
);
glTexEnvi
(
GL_TEXTURE_ENV
,
OPERANDx_RGB_EXT
(
Type
),
operand
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, OPERANDx_RGB_EXT, operand);"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, OPERANDx_RGB_EXT, operand);"
);
}
}
break
;
...
...
@@ -3442,9 +3441,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
{
int
Scale
=
1
;
int
Parm
=
(
Type
==
D3DTSS_ALPHAOP
)
?
GL_COMBINE_ALPHA_EXT
:
GL_COMBINE_RGB_EXT
;
int
Parm
=
(
Type
==
D3DTSS_ALPHAOP
)
?
GL_COMBINE_ALPHA_EXT
:
GL_COMBINE_RGB_EXT
;
if
(
Type
==
D3DTSS_COLOROP
&&
Value
==
D3DTOP_DISABLE
)
{
if
(
Type
==
D3DTSS_COLOROP
&&
Value
==
D3DTOP_DISABLE
)
{
/* TODO: Disable by making this and all later levels disabled */
glDisable
(
GL_TEXTURE_1D
);
checkGLcall
(
"Disable GL_TEXTURE_1D"
);
...
...
@@ -3455,7 +3454,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
}
else
{
/* Enable only the appropriate texture dimension */
if
(
Type
==
D3DTSS_COLOROP
)
{
if
(
Type
==
D3DTSS_COLOROP
)
{
if
(
This
->
StateBlock
->
textureDimensions
[
Stage
]
==
GL_TEXTURE_1D
)
{
glEnable
(
GL_TEXTURE_1D
);
checkGLcall
(
"Enable GL_TEXTURE_1D"
);
...
...
@@ -3504,10 +3503,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
/* Correct scale */
if
(
Type
==
D3DTSS_ALPHAOP
)
{
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_ALPHA_SCALE
,
Scale
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, Scale)"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, Scale)"
);
}
else
{
glTexEnvi
(
GL_TEXTURE_ENV
,
GL_RGB_SCALE_EXT
,
Scale
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, Scale)"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, Scale)"
);
}
glTexEnvi
(
GL_TEXTURE_ENV
,
Parm
,
GL_MODULATE
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_MODULATE);"
);
...
...
@@ -3515,13 +3514,13 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
case
D3DTOP_ADD
:
glTexEnvi
(
GL_TEXTURE_ENV
,
Parm
,
GL_ADD
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD)"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD)"
);
break
;
case
D3DTOP_ADDSIGNED2X
:
Scale
=
Scale
*
2
;
/* Drop through */
case
D3DTOP_ADDSIGNED
:
glTexEnvi
(
GL_TEXTURE_ENV
,
Parm
,
GL_ADD_SIGNED_EXT
);
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD_SIGNED_EXT)"
);
v
checkGLcall
(
"glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD_SIGNED_EXT)"
);
break
;
case
D3DTOP_DOTPRODUCT3
:
...
...
dlls/d3d8/directx.c
View file @
18af8d86
...
...
@@ -335,8 +335,15 @@ HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps (LPDIRECT3D8 iface,
pCaps
->
LineCaps
=
D3DLINECAPS_TEXTURE
|
D3DLINECAPS_ZTEST
;
pCaps
->
MaxTextureWidth
=
16384
;
pCaps
->
MaxTextureHeight
=
16384
;
/*pCaps->MaxTextureWidth = 16384;
pCaps->MaxTextureHeight = 16384;*/
{
GLint
gl_tex_size
;
glGetIntegerv
(
GL_MAX_TEXTURE_SIZE
,
&
gl_tex_size
);
pCaps
->
MaxTextureWidth
=
gl_tex_size
;
pCaps
->
MaxTextureHeight
=
gl_tex_size
;
}
pCaps
->
MaxVolumeExtent
=
0
;
pCaps
->
MaxTextureRepeat
=
32768
;
...
...
@@ -372,7 +379,11 @@ HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps (LPDIRECT3D8 iface,
{
GLint
gl_max
;
#if defined(GL_VERSION_1_3)
glGetIntegerv
(
GL_MAX_TEXTURE_UNITS
,
&
gl_max
);
#else
glGetIntegerv
(
GL_MAX_TEXTURE_UNITS_ARB
,
&
gl_max
);
#endif
pCaps
->
MaxTextureBlendStages
=
min
(
8
,
gl_max
);
pCaps
->
MaxSimultaneousTextures
=
min
(
8
,
gl_max
);
TRACE
(
"GLCaps: GL_MAX_TEXTURE_UNITS_ARB=%ld
\n
"
,
pCaps
->
MaxTextureBlendStages
);
...
...
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