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
e23f70b2
Commit
e23f70b2
authored
Jan 08, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Make the implementation of clearToBlackIfNeeded compatible with core contexts.
parent
9d911d6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
cocoa_opengl.m
dlls/winemac.drv/cocoa_opengl.m
+27
-2
No files found.
dlls/winemac.drv/cocoa_opengl.m
View file @
e23f70b2
...
@@ -85,16 +85,41 @@
...
@@ -85,16 +85,41 @@
if
(
shouldClearToBlack
)
if
(
shouldClearToBlack
)
{
{
NSOpenGLContext
*
origContext
=
[
NSOpenGLContext
currentContext
];
NSOpenGLContext
*
origContext
=
[
NSOpenGLContext
currentContext
];
const
char
*
gl_version
;
unsigned
int
major
;
GLint
draw_framebuffer_binding
,
draw_buffer
;
GLboolean
scissor_test
,
color_mask
[
4
];
GLfloat
clear_color
[
4
];
[
self
makeCurrentContext
];
[
self
makeCurrentContext
];
glPushAttrib
(
GL_COLOR_BUFFER_BIT
|
GL_SCISSOR_BIT
);
gl_version
=
(
const
char
*
)
glGetString
(
GL_VERSION
);
major
=
gl_version
[
0
]
-
'0'
;
/* FIXME: Should check for GL_ARB_framebuffer_object and GL_EXT_framebuffer_object
* for older GL versions. */
if
(
major
>=
3
)
{
glGetIntegerv
(
GL_DRAW_FRAMEBUFFER_BINDING
,
&
draw_framebuffer_binding
);
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
0
);
}
glGetIntegerv
(
GL_DRAW_BUFFER
,
&
draw_buffer
);
scissor_test
=
glIsEnabled
(
GL_SCISSOR_TEST
);
glGetBooleanv
(
GL_COLOR_WRITEMASK
,
color_mask
);
glGetFloatv
(
GL_COLOR_CLEAR_VALUE
,
clear_color
);
glDrawBuffer
(
GL_FRONT_AND_BACK
);
glDrawBuffer
(
GL_FRONT_AND_BACK
);
glDisable
(
GL_SCISSOR_TEST
);
glDisable
(
GL_SCISSOR_TEST
);
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
glColorMask
(
GL_TRUE
,
GL_TRUE
,
GL_TRUE
,
GL_TRUE
);
glClearColor
(
0
,
0
,
0
,
1
);
glClearColor
(
0
,
0
,
0
,
1
);
glClear
(
GL_COLOR_BUFFER_BIT
);
glClear
(
GL_COLOR_BUFFER_BIT
);
glPopAttrib
();
glClearColor
(
clear_color
[
0
],
clear_color
[
1
],
clear_color
[
2
],
clear_color
[
3
]);
glColorMask
(
color_mask
[
0
],
color_mask
[
1
],
color_mask
[
2
],
color_mask
[
3
]);
if
(
scissor_test
)
glEnable
(
GL_SCISSOR_TEST
);
glDrawBuffer
(
draw_buffer
);
if
(
major
>=
3
)
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
draw_framebuffer_binding
);
glFlush
();
glFlush
();
if
(
origContext
)
if
(
origContext
)
...
...
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