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
550a3bbf
Commit
550a3bbf
authored
Jun 18, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Reuse the FBO for check_fbo_compat().
parent
41d93e1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
utils.c
dlls/wined3d/utils.c
+13
-4
No files found.
dlls/wined3d/utils.c
View file @
550a3bbf
...
...
@@ -559,8 +559,8 @@ static BOOL init_format_compression_info(WineD3D_GL_Info *gl_info)
static
BOOL
check_fbo_compat
(
const
WineD3D_GL_Info
*
gl_info
,
GLint
internal_format
,
GLenum
format
,
GLenum
type
)
{
GLuint
tex
,
fb
;
GLenum
status
;
GLuint
tex
;
ENTER_GL
();
...
...
@@ -571,12 +571,9 @@ static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_form
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
GL_EXTCALL
(
glGenFramebuffersEXT
(
1
,
&
fb
));
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
fb
));
GL_EXTCALL
(
glFramebufferTexture2DEXT
(
GL_FRAMEBUFFER_EXT
,
GL_COLOR_ATTACHMENT0_EXT
,
GL_TEXTURE_2D
,
tex
,
0
));
status
=
GL_EXTCALL
(
glCheckFramebufferStatusEXT
(
GL_FRAMEBUFFER_EXT
));
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
fb
));
glDeleteTextures
(
1
,
&
tex
);
checkGLcall
(
"Framebuffer format check"
);
...
...
@@ -589,6 +586,13 @@ static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_form
static
void
init_format_fbo_compat_info
(
WineD3D_GL_Info
*
gl_info
)
{
unsigned
int
i
;
GLuint
fbo
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
GL_EXTCALL
(
glGenFramebuffersEXT
(
1
,
&
fbo
));
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
fbo
));
}
for
(
i
=
0
;
i
<
sizeof
(
formats
)
/
sizeof
(
*
formats
);
++
i
)
{
...
...
@@ -652,6 +656,11 @@ static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info)
desc
->
rtInternal
=
desc
->
glInternal
;
}
}
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
fbo
));
}
}
static
BOOL
init_format_texture_info
(
WineD3D_GL_Info
*
gl_info
)
...
...
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