mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- removed deprecated method to retrieve OpenGL extensions
Since we force a core profile and this was explicitly disabled for core profiles, this code has no use anymore
This commit is contained in:
parent
a3df67bdd4
commit
00d97197db
1 changed files with 5 additions and 29 deletions
|
@ -52,35 +52,11 @@ static void CollectExtensions()
|
|||
int max = 0;
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &max);
|
||||
|
||||
if (max == 0)
|
||||
// Use modern method to collect extensions
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
// Try old method to collect extensions
|
||||
const char *supported = (char *)glGetString(GL_EXTENSIONS);
|
||||
|
||||
if (nullptr != supported)
|
||||
{
|
||||
char *extensions = new char[strlen(supported) + 1];
|
||||
strcpy(extensions, supported);
|
||||
|
||||
char *extension = strtok(extensions, " ");
|
||||
|
||||
while (extension)
|
||||
{
|
||||
m_Extensions.Push(FString(extension));
|
||||
extension = strtok(nullptr, " ");
|
||||
}
|
||||
|
||||
delete [] extensions;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use modern method to collect extensions
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
extension = (const char*)glGetStringi(GL_EXTENSIONS, i);
|
||||
m_Extensions.Push(FString(extension));
|
||||
}
|
||||
extension = (const char*)glGetStringi(GL_EXTENSIONS, i);
|
||||
m_Extensions.Push(FString(extension));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue