| Summary: | Querying SDL_GL_ACCELERATED_VISUAL currently not implemented | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jesse Anders <jesseanders> |
| Component: | video | Assignee: | Jesse Anders <jesseanders> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | jesseanders |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Jesse Anders
2011-03-08 19:32:00 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. I agree, we'll punt on this for now. Thanks! |