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
3a8ab00f
Commit
3a8ab00f
authored
Sep 18, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of context_set_depth_stencil_fbo().
Integrate clearing the depth stencil attachment in context_attach_depth_stencil_fbo().
parent
8f2ed870
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
24 deletions
+16
-24
context.c
dlls/wined3d/context.c
+16
-24
No files found.
dlls/wined3d/context.c
View file @
3a8ab00f
...
...
@@ -137,15 +137,23 @@ void context_attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_targe
{
IWineD3DSurfaceImpl
*
depth_stencil_impl
=
(
IWineD3DSurfaceImpl
*
)
depth_stencil
;
if
(
use_render_buffer
&&
depth_stencil_impl
->
current_renderbuffer
)
TRACE
(
"Attach depth stencil %p
\n
"
,
depth_stencil
);
if
(
depth_stencil
)
{
GL_EXTCALL
(
glFramebufferRenderbufferEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_RENDERBUFFER_EXT
,
depth_stencil_impl
->
current_renderbuffer
->
id
));
checkGLcall
(
"glFramebufferRenderbufferEXT()"
);
}
else
{
context_apply_attachment_filter_states
((
IWineD3DDevice
*
)
This
,
depth_stencil
,
TRUE
);
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
{
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
));
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()"
);
}
}
else
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
fbo_target
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
}
...
...
@@ -169,22 +177,6 @@ void context_attach_surface_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, DWO
}
}
/* TODO: Handle stencil attachments */
static
void
context_set_depth_stencil_fbo
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
*
depth_stencil
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"Set depth stencil to %p
\n
"
,
depth_stencil
);
if
(
depth_stencil
)
{
context_attach_depth_stencil_fbo
(
This
,
GL_FRAMEBUFFER_EXT
,
depth_stencil
,
TRUE
);
}
else
{
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
GL_FRAMEBUFFER_EXT
,
GL_DEPTH_ATTACHMENT_EXT
,
GL_TEXTURE_2D
,
0
,
0
));
checkGLcall
(
"glFramebufferTexture2DEXT()"
);
}
}
static
void
context_check_fbo_status
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -267,7 +259,7 @@ void context_apply_fbo_state(IWineD3DDevice *iface)
{
surface_set_compatible_renderbuffer
(
This
->
stencilBufferTarget
,
w
,
h
);
}
context_
set_depth_stencil_fbo
(
iface
,
This
->
stencilBufferTarget
);
context_
attach_depth_stencil_fbo
(
This
,
GL_FRAMEBUFFER_EXT
,
This
->
stencilBufferTarget
,
TRUE
);
context
->
fbo_depth_attachment
=
This
->
stencilBufferTarget
;
}
...
...
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