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
7b55a0cf
Commit
7b55a0cf
authored
Mar 04, 2006
by
Vitaly Budovski
Committed by
Alexandre Julliard
Mar 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implemented fallback for separate stencil operation in WINED3DRS_CCW_STENCIL*.
parent
858be437
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
device.c
dlls/wined3d/device.c
+18
-4
wined3d_gl.h
include/wine/wined3d_gl.h
+21
-0
No files found.
dlls/wined3d/device.c
View file @
7b55a0cf
...
...
@@ -3752,9 +3752,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
GLint
action
=
StencilOp
(
Value
);
glGetIntegerv
(
GL_STENCIL_FAIL
,
&
stencilFail
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_FAIL
,
&
depthFail
);
glGetIntegerv
(
GL_STENCIL_PASS_DEPTH_PASS
,
&
stencilPass
);
glGetIntegerv
(
GL_STENCIL_
BACK_
FAIL
,
&
stencilFail
);
glGetIntegerv
(
GL_STENCIL_
BACK_
PASS_DEPTH_FAIL
,
&
depthFail
);
glGetIntegerv
(
GL_STENCIL_
BACK_
PASS_DEPTH_PASS
,
&
stencilPass
);
if
(
WINED3DRS_CCW_STENCILFAIL
==
State
)
{
stencilFail
=
action
;
...
...
@@ -3770,8 +3770,22 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
if
(
GL_EXTCALL
(
glStencilOpSeparate
))
{
GL_EXTCALL
(
glStencilOpSeparate
(
GL_BACK
,
stencilFail
,
depthFail
,
stencilPass
));
checkGLcall
(
"glStencilOpSeparate(GL_BACK,...)"
);
}
else
if
(
GL_EXTCALL
(
glActiveStencilFaceEXT
))
{
glEnable
(
GL_STENCIL_TEST_TWO_SIDE_EXT
);
checkGLcall
(
"glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)"
);
GL_EXTCALL
(
glActiveStencilFaceEXT
(
GL_BACK
));
checkGLcall
(
"glActiveStencilFaceEXT(GL_BACK)"
);
glStencilOp
(
stencilFail
,
depthFail
,
stencilPass
);
checkGLcall
(
"glStencilOp(...)"
);
}
else
if
(
GL_EXTCALL
(
glStencilOpSeparateATI
))
{
GL_EXTCALL
(
glStencilOpSeparateATI
(
GL_BACK
,
stencilFail
,
depthFail
,
stencilPass
));
checkGLcall
(
"glStencilOpSeparateATI(GL_BACK,...)"
);
}
else
{
WARN
(
"Unsupported in local OpenGL implementation: glStencilOpSeparate
\n
"
);
TRACE
(
"Separate stencil operation not supported on this version of opengl"
);
glStencilOp
(
stencilFail
,
depthFail
,
stencilPass
);
checkGLcall
(
"glStencilOp(...)"
);
}
}
else
{
glStencilOp
(
stencilFail
,
depthFail
,
stencilPass
);
...
...
include/wine/wined3d_gl.h
View file @
7b55a0cf
...
...
@@ -803,6 +803,23 @@ typedef void (APIENTRY * PGLFNBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
typedef
void
(
APIENTRY
*
PGLFNENDOCCLUSIONQUERYNVPROC
)
(
void
);
typedef
void
(
APIENTRY
*
PGLFNGETOCCLUSIONQUERYIVNVPROC
)
(
GLuint
id
,
GLenum
pname
,
GLint
*
params
);
typedef
void
(
APIENTRY
*
PGLFNGETOCCLUSIONQUERYUIVNVPROC
)
(
GLuint
id
,
GLenum
pname
,
GLuint
*
params
);
/* GL_EXT_stencil_two_side */
#ifndef GL_EXT_stencil_two_side
#define GL_EXT_stencil_two_side 1
#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
#endif
typedef
void
(
APIENTRY
*
PGLFNACTIVESTENCILFACEEXTPROC
)
(
GLenum
face
);
/* GL_ATI_separate_stencil */
#ifndef GL_ATI_separate_stencil
#define GL_ATI_separate_stencil 1
#define GL_STENCIL_BACK_FUNC_ATI 0x8800
#define GL_STENCIL_BACK_FAIL_ATI 0x8801
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
#endif
typedef
void
(
APIENTRY
*
PGLFNSTENCILOPSEPARATEATIPROC
)
(
GLenum
,
GLenum
,
GLenum
,
GLenum
);
typedef
void
(
APIENTRY
*
PGLFNSTENCILFUNCSEPARATEATIPROC
)
(
GLenum
,
GLenum
,
GLint
,
GLuint
);
/* OpenGL 2.0 */
typedef
void
(
APIENTRY
*
PGLFNSTENCILOPSEPARATEPROC
)
(
GLenum
face
,
GLenum
sfail
,
GLenum
dpfail
,
GLenum
dppass
);
typedef
void
(
APIENTRY
*
PGLFNSTENCILFUNCSEPARATEPROC
)
(
GLenum
face
,
GLenum
func
,
GLint
ref
,
GLuint
mask
);
...
...
@@ -1034,6 +1051,10 @@ typedef enum _GL_SupportedExt {
USE_GL_FUNC(PGLFNVERTEXATTRIBPOINTERARBPROC, glVertexAttribPointerARB); \
USE_GL_FUNC(PGLFNENABLEVERTEXATTRIBARRAYARBPROC, glEnableVertexAttribArrayARB); \
USE_GL_FUNC(PGLFNDISABLEVERTEXATTRIBARRAYARBPROC, glDisableVertexAttribArrayARB); \
/* GL_EXT_stencil_two_side */
\
USE_GL_FUNC(PGLFNACTIVESTENCILFACEEXTPROC, glActiveStencilFaceEXT); \
USE_GL_FUNC(PGLFNSTENCILOPSEPARATEATIPROC, glStencilOpSeparateATI); \
USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEATIPROC, glStencilFuncSeparateATI); \
/* OpenGL 2.0 */
\
USE_GL_FUNC(PGLFNSTENCILOPSEPARATEPROC, glStencilOpSeparate); \
USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEPROC, glStencilFuncSeparate); \
...
...
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