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
d20768c1
Commit
d20768c1
authored
Mar 02, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Support shininess > 128 if opengl does.
parent
73ba896e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
directx.c
dlls/wined3d/directx.c
+6
-0
state.c
dlls/wined3d/state.c
+7
-6
wined3d_gl.h
include/wine/wined3d_gl.h
+9
-0
No files found.
dlls/wined3d/directx.c
View file @
d20768c1
...
@@ -128,6 +128,7 @@ static const struct {
...
@@ -128,6 +128,7 @@ static const struct {
{
"GL_NV_vertex_program2"
,
NV_VERTEX_PROGRAM2
,
0
},
{
"GL_NV_vertex_program2"
,
NV_VERTEX_PROGRAM2
,
0
},
{
"GL_NV_vertex_program3"
,
NV_VERTEX_PROGRAM3
,
0
},
{
"GL_NV_vertex_program3"
,
NV_VERTEX_PROGRAM3
,
0
},
{
"GL_NV_depth_clamp"
,
NV_DEPTH_CLAMP
,
0
},
{
"GL_NV_depth_clamp"
,
NV_DEPTH_CLAMP
,
0
},
{
"GL_NV_light_max_exponent"
,
NV_LIGHT_MAX_EXPONENT
,
0
},
/* SGI */
/* SGI */
{
"GL_SGIS_generate_mipmap"
,
SGIS_GENERATE_MIPMAP
,
0
},
{
"GL_SGIS_generate_mipmap"
,
SGIS_GENERATE_MIPMAP
,
0
},
...
@@ -955,6 +956,11 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
...
@@ -955,6 +956,11 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
}
else
if
(
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM
])
{
}
else
if
(
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM
])
{
gl_info
->
ps_nv_version
=
PS_VERSION_20
;
gl_info
->
ps_nv_version
=
PS_VERSION_20
;
}
}
if
(
gl_info
->
supported
[
NV_LIGHT_MAX_EXPONENT
])
{
glGetFloatv
(
GL_MAX_SHININESS_NV
,
&
gl_info
->
max_shininess
);
}
else
{
gl_info
->
max_shininess
=
128
.
0
;
}
if
(
gl_info
->
supported
[
ARB_TEXTURE_NON_POWER_OF_TWO
])
{
if
(
gl_info
->
supported
[
ARB_TEXTURE_NON_POWER_OF_TWO
])
{
/* If we have full NP2 texture support, disable GL_ARB_texture_rectangle because we will never use it.
/* If we have full NP2 texture support, disable GL_ARB_texture_rectangle because we will never use it.
* This saves a few redundant glDisable calls
* This saves a few redundant glDisable calls
...
...
dlls/wined3d/state.c
View file @
d20768c1
...
@@ -664,14 +664,15 @@ state_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCon
...
@@ -664,14 +664,15 @@ state_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCon
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
(
float
*
)
&
stateblock
->
material
.
Specular
);
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
(
float
*
)
&
stateblock
->
material
.
Specular
);
checkGLcall
(
"glMaterialfv"
);
checkGLcall
(
"glMaterialfv"
);
if
(
stateblock
->
material
.
Power
>
128
.
0
)
{
if
(
stateblock
->
material
.
Power
>
GL_LIMITS
(
shininess
)
)
{
/* glMaterialf man page says that the material says that GL_SHININESS must be between 0.0
/* glMaterialf man page says that the material says that GL_SHININESS must be between 0.0
* and 128.0, although in d3d neither -1 nor 129 produce an error. For values > 128 clamp
* and 128.0, although in d3d neither -1 nor 129 produce an error. GL_NV_max_light_exponent
* them, since 128 results in a hardly visible specular highlight, so it should be safe to
* allows bigger values. If the extension is supported, GL_LIMITS(shininess) contains the
* to clamp to 128
* value reported by the extension, otherwise 128. For values > GL_LIMITS(shininess) clamp
* them, it should be safe to do so without major visual dissortions.
*/
*/
WARN
(
"Material power
> 128
\n
"
);
WARN
(
"Material power
= %f, limit %f
\n
"
,
stateblock
->
material
.
Power
,
GL_LIMITS
(
shininess
)
);
glMaterialf
(
GL_FRONT_AND_BACK
,
GL_SHININESS
,
128
.
0
);
glMaterialf
(
GL_FRONT_AND_BACK
,
GL_SHININESS
,
GL_LIMITS
(
shininess
)
);
}
else
{
}
else
{
glMaterialf
(
GL_FRONT_AND_BACK
,
GL_SHININESS
,
stateblock
->
material
.
Power
);
glMaterialf
(
GL_FRONT_AND_BACK
,
GL_SHININESS
,
stateblock
->
material
.
Power
);
}
}
...
...
include/wine/wined3d_gl.h
View file @
d20768c1
...
@@ -2913,6 +2913,13 @@ typedef void (WINE_GLAPI * PGLFNPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target,
...
@@ -2913,6 +2913,13 @@ typedef void (WINE_GLAPI * PGLFNPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target,
typedef
void
(
WINE_GLAPI
*
PGLFNPROGRAMLOCALPARAMETERS4FVEXTPROC
)
(
GLenum
target
,
GLuint
index
,
GLsizei
count
,
const
float
*
params
);
typedef
void
(
WINE_GLAPI
*
PGLFNPROGRAMLOCALPARAMETERS4FVEXTPROC
)
(
GLenum
target
,
GLuint
index
,
GLsizei
count
,
const
float
*
params
);
#endif
#endif
/* GL_NV_light_max_exponent */
#ifndef GL_NV_light_max_exponent
#define GL_NV_light_max_exponent
#define GL_MAX_SHININESS_NV 0x8504
#define GL_MAX_SPOT_EXPONENT_NV 0x8505
#endif
/* GL_VERSION_2_0 */
/* GL_VERSION_2_0 */
#ifndef GL_VERSION_2_0
#ifndef GL_VERSION_2_0
#define GL_VERSION_2_0 1
#define GL_VERSION_2_0 1
...
@@ -3267,6 +3274,7 @@ typedef enum _GL_SupportedExt {
...
@@ -3267,6 +3274,7 @@ typedef enum _GL_SupportedExt {
NV_VERTEX_PROGRAM3
,
NV_VERTEX_PROGRAM3
,
NV_FENCE
,
NV_FENCE
,
NV_DEPTH_CLAMP
,
NV_DEPTH_CLAMP
,
NV_LIGHT_MAX_EXPONENT
,
/* ATI */
/* ATI */
ATI_SEPARATE_STENCIL
,
ATI_SEPARATE_STENCIL
,
ATI_TEXTURE_ENV_COMBINE3
,
ATI_TEXTURE_ENV_COMBINE3
,
...
@@ -3722,6 +3730,7 @@ typedef struct _WineD3D_GL_Info {
...
@@ -3722,6 +3730,7 @@ typedef struct _WineD3D_GL_Info {
UINT
max_anisotropy
;
UINT
max_anisotropy
;
UINT
max_aux_buffers
;
UINT
max_aux_buffers
;
UINT
max_glsl_varyings
;
UINT
max_glsl_varyings
;
float
max_shininess
;
unsigned
max_vshader_constantsF
;
unsigned
max_vshader_constantsF
;
unsigned
max_pshader_constantsF
;
unsigned
max_pshader_constantsF
;
...
...
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