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 1164 - Querying SDL_GL_ACCELERATED_VISUAL currently not implemented
Summary: Querying SDL_GL_ACCELERATED_VISUAL currently not implemented
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 minor
Assignee: Jesse Anders
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 19:32 UTC by Jesse Anders
Modified: 2011-04-08 11:40 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 Jesse Anders 2011-03-08 19:32:00 UTC
This is more of an unimplemented feature than a bug, but just for tracking purposes, querying of SDL_GL_ACCELERATED_VISUAL via SDL_GL_SetAttribute() is currently unimplemented for all platforms. (I'll attempt to put together a patch for this and will submit it if successful.)
Comment 1 Jesse Anders 2011-04-08 11:35:09 UTC
I doubt anyone is anxiously waiting on support for querying of the 'accelerated visual' attribute, but I've worked on it, for what it's worth, and here's what I have so far.

After looking into it, it seems to me the 'proper' way to query for hardware acceleration is to add a new delegate function to the SDL_VideoDevice struct.

The initial idea was simply to set the value of gl_config.accelerated as appropriate, and then return that value in SDL_GL_GetAttribute(). However, this doesn't seem consistent with the API; the other attributes reflect what the user requested, not what was received, and using gl_config.accelerated for the latter would be inconsistent in that respect. In other words, it doesn't seem like creating a context should change the attributes that the user requested.

I tried some other approaches, but in terms of providing consistent error reporting and intuitive behavior, it seems a new SDL_VideoDevice delegate is the most 'correct' solution. That's fairly heavyweight though, in that it involves touching more code than the other methods. Finally, I only have a solution prepared for Windows; the other supported platforms would have to be investigated individually.

An easy and straightforward solution would be to generate a 'not supported' error when SDL_GL_ACCELERATED_VISUAL is queried, and put correct querying on the 'wish list' for the future. The query certainly isn't a critical feature and is something that could be deferred, so that might be the most logical solution.
Comment 2 Sam Lantinga 2011-04-08 11:40:33 UTC
I agree, we'll punt on this for now.

Thanks!