mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
better debug output
This commit is contained in:
parent
f38f17b116
commit
ffb3eb80ae
@ -1473,6 +1473,26 @@ cg_compile_shader(const ShaderCaps &caps) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG: output the generated program
|
||||||
|
if (gobj_cat.is_debug()) {
|
||||||
|
const char *vertex_program;
|
||||||
|
const char *pixel_program;
|
||||||
|
const char *geometry_program;
|
||||||
|
|
||||||
|
if (_cg_vprogram != 0) {
|
||||||
|
vertex_program = cgGetProgramString (_cg_vprogram, CG_COMPILED_PROGRAM);
|
||||||
|
gobj_cat.debug() << vertex_program << "\n";
|
||||||
|
}
|
||||||
|
if (_cg_fprogram != 0) {
|
||||||
|
pixel_program = cgGetProgramString (_cg_fprogram, CG_COMPILED_PROGRAM);
|
||||||
|
gobj_cat.debug() << pixel_program << "\n";
|
||||||
|
}
|
||||||
|
if (_cg_gprogram != 0) {
|
||||||
|
geometry_program = cgGetProgramString (_cg_gprogram, CG_COMPILED_PROGRAM);
|
||||||
|
gobj_cat.debug() << geometry_program << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1578,26 +1598,6 @@ cg_analyze_shader(const ShaderCaps &caps) {
|
|||||||
_ptr_spec[i]._info._id = _ptr_spec[i]._id;
|
_ptr_spec[i]._info._id = _ptr_spec[i]._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG: output the generated program
|
|
||||||
if (gobj_cat.is_debug()) {
|
|
||||||
const char *vertex_program;
|
|
||||||
const char *pixel_program;
|
|
||||||
const char *geometry_program;
|
|
||||||
|
|
||||||
if (_cg_vprogram != 0) {
|
|
||||||
vertex_program = cgGetProgramString (_cg_vprogram, CG_COMPILED_PROGRAM);
|
|
||||||
gobj_cat.debug() << vertex_program << "\n";
|
|
||||||
}
|
|
||||||
if (_cg_fprogram != 0) {
|
|
||||||
pixel_program = cgGetProgramString (_cg_fprogram, CG_COMPILED_PROGRAM);
|
|
||||||
gobj_cat.debug() << pixel_program << "\n";
|
|
||||||
}
|
|
||||||
if (_cg_gprogram != 0) {
|
|
||||||
geometry_program = cgGetProgramString (_cg_gprogram, CG_COMPILED_PROGRAM);
|
|
||||||
gobj_cat.debug() << geometry_program << "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// // The following code is present to work around a bug in the Cg compiler.
|
// // The following code is present to work around a bug in the Cg compiler.
|
||||||
// // It does not generate correct code for shadow map lookups when using arbfp1.
|
// // It does not generate correct code for shadow map lookups when using arbfp1.
|
||||||
// // This is a particularly onerous limitation, given that arbfp1 is the only
|
// // This is a particularly onerous limitation, given that arbfp1 is the only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user