MCPcopy Create free account
hub / github.com/TankOs/SFGUI / GetAttributeLocation

Function GetAttributeLocation

src/SFGUI/Canvas.cpp:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97auto non_legacy_supported = false;
98
99unsigned 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
113unsigned int CreateShader( const char* vertex_source, const char* fragment_source ) {
114 auto shader = CheckGLError( GLEXT_glCreateProgramObject() );

Callers 1

SetupShaderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected