| Summary: | Large images not loading on intel chipset | ||
|---|---|---|---|
| Product: | SDL | Reporter: | mattreecebentley |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72, icculus |
| Version: | 2.0.1 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
|
Description
mattreecebentley
2014-01-11 07:07:38 UTC
GPUs / drivers have a maximum texture size. For lower-end and very old GPUs, this tends to be 2048x2048 or 4096x4096. I don't think it'd make sense for SDL to switch its entire pipeline to software rendering (which it'd need to do) if one asset's size is larger than the GPU's maximum. http://feedback.wildfiregames.com/report/opengl/feature/GL_MAX_TEXTURE_SIZE has some data on the max texture size for various GPUs/drivers. Also, SDL_GetRendererInfo[1][2] will give you the maximum supported texture width and height at runtime. [1]: http://wiki.libsdl.org/SDL_GetRendererInfo [2]: http://wiki.libsdl.org/SDL_RendererInfo Thanks for that Alex, it more-or-less clears it up, two questions: 1. Is there anywhere in SDL to check available video texture memory? ie. not just max width/height 2. Would it be possible to - rather than shifting the entire pipeline into software - implement a texture as a surface "under the hood" if for some reason (either video ram limitations or max height/width) it won't fit into video memory? Or would that be taking the library away from the bare metal?
> 2. Would it be possible to - rather than shifting the entire pipeline into
> software - implement a texture as a surface "under the hood" if for some
> reason (either video ram limitations or max height/width) it won't fit into
> video memory? Or would that be taking the library away from the bare metal?
One could build a system that splits a surface into multiple textures, but we're probably not going to do this in SDL, especially as even low-end hardware can take pretty big textures now, too.
--ryan.
Yes, this is how I've implemented it in my library. |