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
7422babd
Commit
7422babd
authored
Jun 08, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set FBO stencil attachments for relevant depth stencil formats.
parent
a2244051
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
7 deletions
+53
-7
context.c
dlls/wined3d/context.c
+53
-7
No files found.
dlls/wined3d/context.c
View file @
7422babd
...
...
@@ -66,6 +66,9 @@ static void context_clean_fbo_attachments(IWineD3DDeviceImpl *This)
}
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
GL_FRAMEBUFFER_EXT
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2D()"
);
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
GL_FRAMEBUFFER_EXT
,
GL_STENCIL_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2D()"
);
}
/* GL locking is done by the caller */
...
...
@@ -146,7 +149,6 @@ static void context_apply_attachment_filter_states(IWineD3DDevice *iface, IWineD
checkGLcall
(
"apply_attachment_filter_states()"
);
}
/* TODO: Handle stencil attachments */
/* GL locking is done by the caller */
void
context_attach_depth_stencil_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
)
{
...
...
@@ -156,20 +158,64 @@ void context_attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_targe
if
(
depth_stencil
)
{
DWORD
format_flags
=
depth_stencil_impl
->
resource
.
format_desc
->
Flags
;
if
(
use_render_buffer
&&
depth_stencil_impl
->
current_renderbuffer
)
{
GL_EXTCALL
(
glFramebufferRenderbufferEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_RENDERBUFFER_EXT
,
depth_stencil_impl
->
current_renderbuffer
->
id
));
checkGLcall
(
"glFramebufferRenderbufferEXT()"
);
}
else
{
if
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
)
{
GL_EXTCALL
(
glFramebufferRenderbufferEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_RENDERBUFFER_EXT
,
depth_stencil_impl
->
current_renderbuffer
->
id
));
checkGLcall
(
"glFramebufferRenderbufferEXT()"
);
}
if
(
format_flags
&
WINED3DFMT_FLAG_STENCIL
)
{
GL_EXTCALL
(
glFramebufferRenderbufferEXT
(
fbo_target
,
GL_STENCIL_ATTACHMENT_EXT
,
GL_RENDERBUFFER_EXT
,
depth_stencil_impl
->
current_renderbuffer
->
id
));
checkGLcall
(
"glFramebufferRenderbufferEXT()"
);
}
}
else
{
context_apply_attachment_filter_states
((
IWineD3DDevice
*
)
This
,
depth_stencil
,
TRUE
);
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
depth_stencil_impl
->
glDescription
.
target
,
depth_stencil_impl
->
glDescription
.
textureName
,
depth_stencil_impl
->
glDescription
.
level
));
if
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
)
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
depth_stencil_impl
->
glDescription
.
target
,
depth_stencil_impl
->
glDescription
.
textureName
,
depth_stencil_impl
->
glDescription
.
level
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
if
(
format_flags
&
WINED3DFMT_FLAG_STENCIL
)
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_STENCIL_ATTACHMENT_EXT
,
depth_stencil_impl
->
glDescription
.
target
,
depth_stencil_impl
->
glDescription
.
textureName
,
depth_stencil_impl
->
glDescription
.
level
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
}
if
(
!
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
))
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
}
else
{
if
(
!
(
format_flags
&
WINED3DFMT_FLAG_STENCIL
))
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_STENCIL_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
}
else
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_STENCIL_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
}
...
...
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