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
9b889626
Commit
9b889626
authored
Apr 20, 2009
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Apr 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl: Add WGL_EXT_pixel_format_packed_float support.
parent
55ad3fdd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
opengl.c
dlls/winex11.drv/opengl.c
+18
-1
wgl.h
include/wine/wgl.h
+7
-0
No files found.
dlls/winex11.drv/opengl.c
View file @
9b889626
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* Copyright 2000 Lionel Ulmer
* Copyright 2000 Lionel Ulmer
* Copyright 2005 Alex Woods
* Copyright 2005 Alex Woods
* Copyright 2005 Raphael Junqueira
* Copyright 2005 Raphael Junqueira
* Copyright 2006 Roderick Colenbrander
* Copyright 2006
-2009
Roderick Colenbrander
* Copyright 2006 Tomas Carnecky
* Copyright 2006 Tomas Carnecky
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
...
@@ -681,6 +681,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
...
@@ -681,6 +681,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
case
WGL_TYPE_RGBA_ARB
:
pixelattrib
=
GLX_RGBA_BIT
;
break
;
case
WGL_TYPE_RGBA_ARB
:
pixelattrib
=
GLX_RGBA_BIT
;
break
;
/* This is the same as WGL_TYPE_RGBA_FLOAT_ATI but the GLX constants differ, only the ARB GLX one is widely supported so use that */
/* This is the same as WGL_TYPE_RGBA_FLOAT_ATI but the GLX constants differ, only the ARB GLX one is widely supported so use that */
case
WGL_TYPE_RGBA_FLOAT_ATI
:
pixelattrib
=
GLX_RGBA_FLOAT_BIT
;
break
;
case
WGL_TYPE_RGBA_FLOAT_ATI
:
pixelattrib
=
GLX_RGBA_FLOAT_BIT
;
break
;
case
WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT
:
pixelattrib
=
GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT
;
break
;
default
:
default
:
ERR
(
"unexpected PixelType(%x)
\n
"
,
pop
);
ERR
(
"unexpected PixelType(%x)
\n
"
,
pop
);
pop
=
0
;
pop
=
0
;
...
@@ -790,6 +791,11 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
...
@@ -790,6 +791,11 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
TRACE
(
"pAttr[%d] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT: %x
\n
"
,
cur
,
pop
);
TRACE
(
"pAttr[%d] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT: %x
\n
"
,
cur
,
pop
);
break
;
break
;
case
WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT
:
pop
=
iWGLAttr
[
++
cur
];
PUSH2
(
oGLXAttr
,
GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT
,
pop
);
TRACE
(
"pAttr[%d] = GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT: %x
\n
"
,
cur
,
pop
);
break
;
default
:
default
:
FIXME
(
"unsupported %x WGL Attribute
\n
"
,
iWGLAttr
[
cur
]);
FIXME
(
"unsupported %x WGL Attribute
\n
"
,
iWGLAttr
[
cur
]);
break
;
break
;
...
@@ -839,6 +845,9 @@ static int get_render_type_from_fbconfig(Display *display, GLXFBConfig fbconfig)
...
@@ -839,6 +845,9 @@ static int get_render_type_from_fbconfig(Display *display, GLXFBConfig fbconfig)
case
GLX_RGBA_FLOAT_BIT
:
case
GLX_RGBA_FLOAT_BIT
:
render_type
=
GLX_RGBA_FLOAT_TYPE
;
render_type
=
GLX_RGBA_FLOAT_TYPE
;
break
;
break
;
case
GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT
:
render_type
=
GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT
;
break
;
default
:
default
:
ERR
(
"Unknown render_type: %x
\n
"
,
render_type
);
ERR
(
"Unknown render_type: %x
\n
"
,
render_type
);
}
}
...
@@ -2743,6 +2752,7 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
...
@@ -2743,6 +2752,7 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
else
if
(
tmp
&
GLX_COLOR_INDEX_BIT
)
{
piValues
[
i
]
=
WGL_TYPE_COLORINDEX_ARB
;
}
else
if
(
tmp
&
GLX_COLOR_INDEX_BIT
)
{
piValues
[
i
]
=
WGL_TYPE_COLORINDEX_ARB
;
}
else
if
(
tmp
&
GLX_RGBA_FLOAT_BIT
)
{
piValues
[
i
]
=
WGL_TYPE_RGBA_FLOAT_ATI
;
}
else
if
(
tmp
&
GLX_RGBA_FLOAT_BIT
)
{
piValues
[
i
]
=
WGL_TYPE_RGBA_FLOAT_ATI
;
}
else
if
(
tmp
&
GLX_RGBA_FLOAT_ATI_BIT
)
{
piValues
[
i
]
=
WGL_TYPE_RGBA_FLOAT_ATI
;
}
else
if
(
tmp
&
GLX_RGBA_FLOAT_ATI_BIT
)
{
piValues
[
i
]
=
WGL_TYPE_RGBA_FLOAT_ATI
;
}
else
if
(
tmp
&
GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT
)
{
piValues
[
i
]
=
WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT
;
}
else
{
else
{
ERR
(
"unexpected RenderType(%x)
\n
"
,
tmp
);
ERR
(
"unexpected RenderType(%x)
\n
"
,
tmp
);
piValues
[
i
]
=
WGL_TYPE_RGBA_ARB
;
piValues
[
i
]
=
WGL_TYPE_RGBA_ARB
;
...
@@ -2853,6 +2863,10 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
...
@@ -2853,6 +2863,10 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
curGLXAttr
=
GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
;
curGLXAttr
=
GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
;
break
;
break
;
case
WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT
:
curGLXAttr
=
GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT
;
break
;
case
WGL_ACCUM_RED_BITS_ARB
:
case
WGL_ACCUM_RED_BITS_ARB
:
curGLXAttr
=
GLX_ACCUM_RED_SIZE
;
curGLXAttr
=
GLX_ACCUM_RED_SIZE
;
break
;
break
;
...
@@ -3402,6 +3416,9 @@ static void X11DRV_WineGL_LoadExtensions(void)
...
@@ -3402,6 +3416,9 @@ static void X11DRV_WineGL_LoadExtensions(void)
if
(
glxRequireExtension
(
"GLX_EXT_framebuffer_sRGB"
))
if
(
glxRequireExtension
(
"GLX_EXT_framebuffer_sRGB"
))
register_extension_string
(
"WGL_EXT_framebuffer_sRGB"
);
register_extension_string
(
"WGL_EXT_framebuffer_sRGB"
);
if
(
glxRequireExtension
(
"GLX_EXT_fbconfig_packed_float"
))
register_extension_string
(
"WGL_EXT_pixel_format_packed_float"
);
/* The OpenGL extension GL_NV_vertex_array_range adds wgl/glX functions which aren't exported as 'real' wgl/glX extensions. */
/* The OpenGL extension GL_NV_vertex_array_range adds wgl/glX functions which aren't exported as 'real' wgl/glX extensions. */
if
(
strstr
(
WineGLInfo
.
glExtensions
,
"GL_NV_vertex_array_range"
)
!=
NULL
)
if
(
strstr
(
WineGLInfo
.
glExtensions
,
"GL_NV_vertex_array_range"
)
!=
NULL
)
register_extension
(
&
WGL_NV_vertex_array_range
);
register_extension
(
&
WGL_NV_vertex_array_range
);
...
...
include/wine/wgl.h
View file @
9b889626
...
@@ -182,6 +182,13 @@
...
@@ -182,6 +182,13 @@
# define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
# define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
#endif
#endif
/* WGL_EXT_pixel_format_packed_float */
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
#ifndef GLX_EXT_fbconfig_packed_float
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
#endif
/** WGL_ARB_create_context */
/** WGL_ARB_create_context */
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
...
...
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