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
3650e31e
Commit
3650e31e
authored
Jun 06, 2007
by
Phil Costin
Committed by
Alexandre Julliard
Jun 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add GL_EXT_texture_sRGB constants and corresponding CheckDeviceFormat query.
parent
56c6dbee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
directx.c
dlls/wined3d/directx.c
+24
-0
wined3d_gl.h
include/wine/wined3d_gl.h
+21
-0
No files found.
dlls/wined3d/directx.c
View file @
3650e31e
...
...
@@ -718,6 +718,9 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
}
else
if
(
strcmp
(
ThisExtn
,
"GL_EXT_texture_env_dot3"
)
==
0
)
{
TRACE_
(
d3d_caps
)(
" FOUND: EXT Dot3 support
\n
"
);
gl_info
->
supported
[
EXT_TEXTURE_ENV_DOT3
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_EXT_texture_sRGB"
)
==
0
)
{
TRACE_
(
d3d_caps
)(
" FOUND: EXT sRGB support
\n
"
);
gl_info
->
supported
[
EXT_TEXTURE_SRGB
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_EXT_texture_filter_anisotropic"
)
==
0
)
{
gl_info
->
supported
[
EXT_TEXTURE_FILTER_ANISOTROPIC
]
=
TRUE
;
glGetIntegerv
(
GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
,
&
gl_max
);
...
...
@@ -1726,6 +1729,27 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
}
/* Check for supported sRGB formats (Texture loading and framebuffer) */
if
(
GL_SUPPORT
(
EXT_TEXTURE_SRGB
)
&&
(
Usage
&
WINED3DUSAGE_QUERY_SRGBREAD
))
{
switch
(
CheckFormat
)
{
case
WINED3DFMT_A8R8G8B8
:
case
WINED3DFMT_X8R8G8B8
:
case
WINED3DFMT_L8
:
case
WINED3DFMT_A8L8
:
case
WINED3DFMT_DXT1
:
case
WINED3DFMT_DXT2
:
case
WINED3DFMT_DXT3
:
case
WINED3DFMT_DXT4
:
case
WINED3DFMT_DXT5
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
default:
TRACE_
(
d3d_caps
)(
"[FAILED] Gamma texture format %s not supported.
\n
"
,
debug_d3dformat
(
CheckFormat
));
return
WINED3DERR_NOTAVAILABLE
;
}
}
if
(
GL_SUPPORT
(
ARB_TEXTURE_FLOAT
))
{
BOOL
half_pixel_support
=
GL_SUPPORT
(
ARB_HALF_FLOAT_PIXEL
);
...
...
include/wine/wined3d_gl.h
View file @
3650e31e
...
...
@@ -520,6 +520,26 @@ typedef void (APIENTRY * PGLFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint leve
#define GL_DOT3_RGB_EXT 0x8740
#define GL_DOT3_RGBA_EXT 0x8741
#endif
/* GL_EXT_texture_sRGB */
#ifndef GL_EXT_texture_sRGB
#define GL_EXT_texture_sRGB 1
#define GL_SRGB_EXT 0x8C40
#define GL_SRGB8_EXT 0x8C41
#define GL_SRGB_ALPHA_EXT 0x8C42
#define GL_SRGB8_ALPHA8_EXT 0x8C43
#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
#define GL_SLUMINANCE_EXT 0x8C46
#define GL_SLUMINANCE8_EXT 0x8C47
#define GL_COMPRESSED_SRGB_EXT 0x8C48
#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
#endif
/* GL_ARB_texture_float */
#ifndef GL_ARB_texture_float
#define GL_ARB_texture_float 1
...
...
@@ -1541,6 +1561,7 @@ typedef enum _GL_SupportedExt {
EXT_TEXTURE_ENV_ADD
,
EXT_TEXTURE_ENV_COMBINE
,
EXT_TEXTURE_ENV_DOT3
,
EXT_TEXTURE_SRGB
,
EXT_VERTEX_WEIGHTING
,
/* NVIDIA */
NV_FOG_DISTANCE
,
...
...
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