… | |
… | |
377 | glEnable (GL_LIGHT0); |
377 | glEnable (GL_LIGHT0); |
378 | |
378 | |
379 | cgc = cgCreateContext (); |
379 | cgc = cgCreateContext (); |
380 | |
380 | |
381 | vsh_profile = CG_PROFILE_ARBVP1; |
381 | vsh_profile = CG_PROFILE_ARBVP1; |
382 | if (cgGLIsProfileSupported (CG_PROFILE_VP30)) vsh_profile = CG_PROFILE_VP30; |
382 | //if (cgGLIsProfileSupported (CG_PROFILE_VP30)) vsh_profile = CG_PROFILE_VP30; |
383 | if (cgGLIsProfileSupported (CG_PROFILE_VP40)) vsh_profile = CG_PROFILE_VP40; |
383 | //if (cgGLIsProfileSupported (CG_PROFILE_VP40)) vsh_profile = CG_PROFILE_VP40; |
384 | fsh_profile = CG_PROFILE_ARBFP1; |
384 | fsh_profile = CG_PROFILE_ARBFP1; |
385 | if (cgGLIsProfileSupported (CG_PROFILE_FP30)) fsh_profile = CG_PROFILE_FP30; |
385 | //if (cgGLIsProfileSupported (CG_PROFILE_FP30)) fsh_profile = CG_PROFILE_FP30; |
386 | if (cgGLIsProfileSupported (CG_PROFILE_FP40)) fsh_profile = CG_PROFILE_FP40; |
386 | //if (cgGLIsProfileSupported (CG_PROFILE_FP40)) fsh_profile = CG_PROFILE_FP40; |
387 | |
387 | |
388 | vsh = cgCreateProgramFromFile (cgc, CG_SOURCE, "vsh.cg", vsh_profile, 0, 0); |
388 | vsh = cgCreateProgramFromFile (cgc, CG_SOURCE, "vsh.cg", vsh_profile, 0, 0); |
389 | CheckCgError (); |
389 | CheckCgError (); |
390 | cgGLLoadProgram (vsh); |
390 | cgGLLoadProgram (vsh); |
391 | CheckCgError (); |
391 | CheckCgError (); |