mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Use the shader model from DisplayInformation if it is better than the Cg shader model detection.
This commit is contained in:
parent
2d7f2f3d09
commit
4390cb4db4
@ -1115,6 +1115,22 @@ reset() {
|
|||||||
}
|
}
|
||||||
cg_profile_to_shader_model++;
|
cg_profile_to_shader_model++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DisplayInformation may have better shader model detection
|
||||||
|
{
|
||||||
|
GraphicsPipe *pipe;
|
||||||
|
DisplayInformation *display_information;
|
||||||
|
|
||||||
|
pipe = this -> get_pipe ( );
|
||||||
|
if (pipe) {
|
||||||
|
display_information = pipe -> get_display_information ( );
|
||||||
|
if (display_information) {
|
||||||
|
if (display_information -> get_shader_model ( ) > _shader_model) {
|
||||||
|
_shader_model = display_information -> get_shader_model ( );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_auto_detect_shader_model = _shader_model;
|
_auto_detect_shader_model = _shader_model;
|
||||||
|
|
||||||
CGprofile vertex_profile;
|
CGprofile vertex_profile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user