//! Replacement of glLoadProgramNV /** This function hides the extension character of glLoadProgramNV and asserts on the result before returning. */ inline void GLLoadProgram( GLenum target, GLuint id, GLsizei len, const GLubyte *program ) { NVSG_GL_STATS_FCT_COUNT(); NVSG_ASSERT( glContext()->m_glFunctions && glContext()->m_glFunctions->glLoadProgramNV ); glContext()->m_glFunctions->glLoadProgramNV( target, id, len, program ); #if !defined(NDEBUG) ASSERT_GL_NO_ERROR; GLint errorPos; glGetIntegerv( GL_PROGRAM_ERROR_POSITION_NV, &errorPos ); NVSG_ASSERT( errorPos == -1 ); #endif }