698 |
<< " program\n"; |
<< " program\n"; |
699 |
|
|
700 |
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_NV, &errpos); |
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_NV, &errpos); |
701 |
if (errpos >= 0 && (unsigned)errpos < source.length()) { |
if (errpos >= 0 && (unsigned)errpos <= source.length()) { |
702 |
std::cerr << "Program error at position " << errpos << ":\n"; |
std::cerr << "Program error at position " << errpos << ":\n"; |
703 |
std::cerr << source.substr(0, errpos) |
std::cerr << source.substr(0, errpos) |
704 |
<< "<ERROR HERE>" |
<< "<ERROR HERE>" |
705 |
<< source.substr(errpos, source.length()); |
<< source.substr(errpos, source.length()) |
706 |
|
<< "\n"; |
707 |
} |
} |
708 |
return false; |
return false; |
709 |
} |
} |
735 |
<< " program\n"; |
<< " program\n"; |
736 |
|
|
737 |
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errpos); |
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errpos); |
738 |
if (errpos >= 0 && (unsigned)errpos < source.length()) { |
if (errpos >= 0 && (unsigned)errpos <= source.length()) { |
739 |
std::cerr << "PRGORAM ERROR: " |
std::cerr << "PRGORAM ERROR: " |
740 |
<< glGetString(GL_PROGRAM_ERROR_STRING_ARB) |
<< glGetString(GL_PROGRAM_ERROR_STRING_ARB) |
741 |
<< " at position " << errpos << ":\n"; |
<< " at position " << errpos << ":\n"; |
742 |
std::cerr << "Program error at position " << errpos << ":\n"; |
std::cerr << "Program error at position " << errpos << ":\n"; |
743 |
std::cerr << source.substr(0, errpos) |
std::cerr << source.substr(0, errpos) |
744 |
<< "<ERROR HERE>" |
<< "<ERROR HERE>" |
745 |
<< source.substr(errpos, source.length()); |
<< source.substr(errpos, source.length()) |
746 |
|
<< "\n"; |
747 |
} |
} |
748 |
return false; |
return false; |
749 |
} |
} |