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
8a041504
Commit
8a041504
authored
Aug 12, 2013
by
Charles Davis
Committed by
Alexandre Julliard
Aug 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Advertise some legacy WGL extensions in the GL_EXTENSIONS string.
parent
2df4caa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
opengl.c
dlls/winemac.drv/opengl.c
+33
-1
No files found.
dlls/winemac.drv/opengl.c
View file @
8a041504
...
...
@@ -104,6 +104,7 @@ static void (*pglCopyColorTable)(GLenum target, GLenum internalformat, GLint x,
static
void
(
*
pglCopyPixels
)(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
,
GLenum
type
);
static
void
(
*
pglFlush
)(
void
);
static
void
(
*
pglFlushRenderAPPLE
)(
void
);
static
const
GLubyte
*
(
*
pglGetString
)(
GLenum
name
);
static
void
(
*
pglReadPixels
)(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLenum
type
,
void
*
pixels
);
static
void
(
*
pglViewport
)(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
);
...
...
@@ -1186,6 +1187,9 @@ static const pixel_format *get_pixel_format(int format, BOOL allow_nondisplayabl
static
BOOL
init_gl_info
(
void
)
{
static
char
legacy_extensions
[]
=
" WGL_EXT_extensions_string"
;
static
const
char
legacy_ext_swap_control
[]
=
" WGL_EXT_swap_control"
;
CGDirectDisplayID
display
=
CGMainDisplayID
();
CGOpenGLDisplayMask
displayMask
=
CGDisplayIDToOpenGLDisplayMask
(
display
);
CGLPixelFormatAttribute
attribs
[]
=
{
...
...
@@ -1198,6 +1202,7 @@ static BOOL init_gl_info(void)
CGLContextObj
context
;
CGLContextObj
old_context
=
CGLGetCurrentContext
();
const
char
*
str
;
size_t
length
;
err
=
CGLChoosePixelFormat
(
attribs
,
&
pix
,
&
virtualScreens
);
if
(
err
!=
kCGLNoError
||
!
pix
)
...
...
@@ -1226,8 +1231,14 @@ static BOOL init_gl_info(void)
gl_info
.
glVersion
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
strcpy
(
gl_info
.
glVersion
,
str
);
str
=
(
const
char
*
)
opengl_funcs
.
gl
.
p_glGetString
(
GL_EXTENSIONS
);
gl_info
.
glExtensions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
length
=
strlen
(
str
)
+
sizeof
(
legacy_extensions
);
if
(
allow_vsync
)
length
+=
strlen
(
legacy_ext_swap_control
);
gl_info
.
glExtensions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
length
);
strcpy
(
gl_info
.
glExtensions
,
str
);
strcat
(
gl_info
.
glExtensions
,
legacy_extensions
);
if
(
allow_vsync
)
strcat
(
gl_info
.
glExtensions
,
legacy_ext_swap_control
);
opengl_funcs
.
gl
.
p_glGetIntegerv
(
GL_MAX_VIEWPORT_DIMS
,
gl_info
.
max_viewport_dims
);
...
...
@@ -1516,6 +1527,26 @@ static void macdrv_glFlush(void)
/**********************************************************************
* macdrv_glGetString
*
* Hook into glGetString in order to return some legacy WGL extensions
* that couldn't be advertised via the standard
* WGL_ARB_extensions_string mechanism. Some programs, especially
* older ones, expect to find certain older extensions, such as
* WGL_EXT_extensions_string itself, in the standard GL extensions
* string, and won't query any other WGL extensions unless they find
* that particular extension there.
*/
static
const
GLubyte
*
macdrv_glGetString
(
GLenum
name
)
{
if
(
name
==
GL_EXTENSIONS
&&
gl_info
.
glExtensions
)
return
(
const
GLubyte
*
)
gl_info
.
glExtensions
;
else
return
pglGetString
(
name
);
}
/**********************************************************************
* macdrv_glReadPixels
*
* Hook into glReadPixels as part of the implementation of
...
...
@@ -3054,6 +3085,7 @@ static BOOL init_opengl(void)
#define REDIRECT(func) \
do { p##func = opengl_funcs.gl.p_##func; opengl_funcs.gl.p_##func = macdrv_##func; } while(0)
REDIRECT
(
glCopyPixels
);
REDIRECT
(
glGetString
);
REDIRECT
(
glReadPixels
);
REDIRECT
(
glViewport
);
if
(
skip_single_buffer_flushes
)
...
...
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