We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1620 - SDL_GL_ExtensionSupported() needs to use glGetStringi() in 3.2 Core Profile
Summary: SDL_GL_ExtensionSupported() needs to use glGetStringi() in 3.2 Core Profile
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P1 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
: 1510 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-10 20:44 UTC by Ryan C. Gordon
Modified: 2013-07-12 11:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2012-10-10 20:44:29 UTC
OpenGL 3.0 added a glGetStringi() entry point that lets you get individual elements of a string. So you can iterate over glGetStringi(GL_EXTENSIONS, i) to get each extension name individually, instead of parsing the whole whitespace-delimited string the usual way.

The OpenGL 3.2 Core Profile removed the usual way, so you have to use glGetStringi() with such a GL context.

Therefore SDL_GL_ExtensionSupported() will need to use this approach in the appropriate cases.


Example of the 3.0 method:

http://hg.icculus.org/icculus/mojoshader/file/c383aebc9f13/mojoshader_opengl.c#l1096

--ryan.
Comment 1 Sam Lantinga 2013-05-21 03:00:46 UTC
Ryan, can you take care of this for the SDL 2.0 release?  This is an important fix for anyone using the SDL API with a 3.2 core profile.
Comment 2 Ryan C. Gordon 2013-05-22 01:31:59 UTC
(In reply to comment #1)
> Ryan, can you take care of this for the SDL 2.0 release?  This is an
> important fix for anyone using the SDL API with a 3.2 core profile.

Fixed in hg changeset 5b35f3e503c4.

--ryan.
Comment 3 Ryan C. Gordon 2013-07-12 11:52:48 UTC
*** Bug 1510 has been marked as a duplicate of this bug. ***