mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
GL: Detach shaders after linking program.
This commit is contained in:
parent
ba1bd59488
commit
376bdf1b74
2 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,7 @@ GL_IMPORT(false, PFNGLCREATESHADERPROC, glCreateShader);
|
|||
GL_IMPORT(false, PFNGLDELETEPROGRAMPROC, glDeleteProgram);
|
||||
GL_IMPORT(false, PFNGLDELETESHADERPROC, glDeleteShader);
|
||||
GL_IMPORT(false, PFNGLATTACHSHADERPROC, glAttachShader);
|
||||
GL_IMPORT(false, PFNGLDETACHSHADERPROC, glDetachShader);
|
||||
GL_IMPORT(false, PFNGLCOMPILESHADERPROC, glCompileShader);
|
||||
GL_IMPORT(false, PFNGLSHADERSOURCEPROC, glShaderSource);
|
||||
GL_IMPORT(false, PFNGLGETSHADERIVPROC, glGetShaderiv);
|
||||
|
|
|
@ -989,6 +989,8 @@ namespace bgfx
|
|||
GL_CHECK(glAttachShader(m_id, _vsh.m_id) );
|
||||
GL_CHECK(glAttachShader(m_id, _fsh.m_id) );
|
||||
GL_CHECK(glLinkProgram(m_id) );
|
||||
GL_CHECK(glDetachShader(m_id, _vsh.m_id) );
|
||||
GL_CHECK(glDetachShader(m_id, _fsh.m_id) );
|
||||
|
||||
GLint linked = 0;
|
||||
GL_CHECK(glGetProgramiv(m_id, GL_LINK_STATUS, &linked) );
|
||||
|
|
Loading…
Reference in a new issue