mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
render: Move to a batching system for rendering (work in progress).
This commit is contained in:
parent
e0cc19f2d8
commit
5fb67f9f55
3 changed files with 455 additions and 70 deletions
|
@ -1029,6 +1029,31 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the 2D render API is compatible or efficient.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" - Don't use batching to make rendering more efficient.
|
||||
* "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
|
||||
*
|
||||
* Up to SDL 2.0.9, the render API would draw immediately when requested. Now
|
||||
* it batches up draw requests and sends them all to the GPU only when forced
|
||||
* to (during SDL_RenderPresent, when changing render targets, by updating a
|
||||
* texture that the batch needs, etc). This is significantly more efficient,
|
||||
* but it can cause problems for apps that expect to render on top of the
|
||||
* render API's output. As such, SDL will disable batching if a specific
|
||||
* render backend is requested (since this might indicate that the app is
|
||||
* planning to use the underlying graphics API directly). This hint can
|
||||
* be used to explicitly request batching in this instance. It is a contract
|
||||
* that you will either never use the underlying graphics API directly, or
|
||||
* if you do, you will call SDL_RenderFlush() before you do so any current
|
||||
* batch goes to the GPU before your work begins. Not following this contract
|
||||
* will result in undefined behavior.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue