| Summary: | Question: Can I draw something with software render over OpenGL surface? | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vitaly Novichkov <admin> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Vitaly Novichkov
2019-09-19 13:16:37 UTC
So some options for this: - Load the textures you need for the loading screen first and then use them while loading everything else. Load some amount of the total textures per frame, perhaps drawing the loading screen and swapping buffers every ~33 milliseconds ( about 30fps) if you're animating something (less if not), regardless of how much you managed to load that frame. - Create a second GL context on your loading thread, and mark it as "shared" with the main context, so they both use the same textures. After loading is done, optionally delete the second context (or keep it around for future loading). All actual drawing happens in the main context. You can't do any software rendering, though. This isn't an SDL restriction, it's an OpenGL one. The closest you could get is uploading pixels you generated yourself in memory to a texture...and then you're in the same position. --ryan. |