mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
detect SM4 and SM5
This commit is contained in:
parent
554e009070
commit
1b76a13784
@ -75,14 +75,14 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
|
||||
enum ShaderModel
|
||||
{
|
||||
enum ShaderModel {
|
||||
SM_00,
|
||||
SM_11,
|
||||
SM_20,
|
||||
SM_2X,
|
||||
SM_30,
|
||||
SM_40,
|
||||
SM_50,
|
||||
};
|
||||
|
||||
INLINE void release_all();
|
||||
|
@ -2352,9 +2352,12 @@ reset() {
|
||||
_shader_model = SM_30;
|
||||
break;
|
||||
case 4:
|
||||
default:
|
||||
_shader_model = SM_40;
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
_shader_model = SM_50;
|
||||
break;
|
||||
}
|
||||
|
||||
_auto_detect_shader_model = _shader_model;
|
||||
|
@ -1718,14 +1718,20 @@ reset() {
|
||||
|
||||
#if defined(HAVE_CG) && !defined(OPENGLES)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
CGprofile cg_profile;
|
||||
int shader_model;
|
||||
}
|
||||
CG_PROFILE_TO_SHADER_MODEL;
|
||||
} CG_PROFILE_TO_SHADER_MODEL;
|
||||
|
||||
static CG_PROFILE_TO_SHADER_MODEL cg_profile_to_shader_model_array[] = {
|
||||
// gp5fp - OpenGL fragment profile for GeForce 400 Series and up
|
||||
CG_PROFILE_GP5FP,
|
||||
SM_50,
|
||||
|
||||
// gp4fp - OpenGL fragment profile for G8x (GeForce 8xxx and up)
|
||||
CG_PROFILE_GP4FP,
|
||||
SM_40,
|
||||
|
||||
// fp40 - OpenGL fragment profile for NV4x (GeForce 6xxx and 7xxx
|
||||
// Series, NV4x-based Quadro FX, etc.)
|
||||
CG_PROFILE_FP40,
|
||||
|
Loading…
x
Reference in New Issue
Block a user