| 97 | auto non_legacy_supported = false; |
| 98 | |
| 99 | unsigned int GetAttributeLocation( unsigned int shader, std::string name ) { |
| 100 | auto location = CheckGLError( GLEXT_glGetAttribLocation( CastToGlHandle( shader ), name.c_str() ) ); |
| 101 | |
| 102 | #if defined( SFGUI_DEBUG ) |
| 103 | if( location < 0 ) { |
| 104 | std::cerr << "SFGUI warning: Failed to get location of attribute \"" << name << "\".\n"; |
| 105 | } |
| 106 | #endif |
| 107 | |
| 108 | assert( location >= 0 ); |
| 109 | |
| 110 | return static_cast<unsigned int>( location ); |
| 111 | } |
| 112 | |
| 113 | unsigned int CreateShader( const char* vertex_source, const char* fragment_source ) { |
| 114 | auto shader = CheckGLError( GLEXT_glCreateProgramObject() ); |