include/SDL_hints.h
branchSDL-ryan-batching-renderer
changeset 12211 0d8f33ad5fbb
parent 12163 dd056c76593a
child 12381 dc9108cd4340
equal deleted inserted replaced
12210:9f9dbcce30b3 12211:0d8f33ad5fbb
  1028  *  https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
  1028  *  https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
  1029  */
  1029  */
  1030 #define SDL_HINT_AUDIO_CATEGORY   "SDL_AUDIO_CATEGORY"
  1030 #define SDL_HINT_AUDIO_CATEGORY   "SDL_AUDIO_CATEGORY"
  1031 
  1031 
  1032 /**
  1032 /**
       
  1033  *  \brief  A variable controlling whether the 2D render API is compatible or efficient.
       
  1034  *
       
  1035  *  This variable can be set to the following values:
       
  1036  *
       
  1037  *    "0"     - Don't use batching to make rendering more efficient.
       
  1038  *    "1"     - Use batching, but might cause problems if app makes its own direct OpenGL calls.
       
  1039  *
       
  1040  *  Up to SDL 2.0.9, the render API would draw immediately when requested. Now
       
  1041  *  it batches up draw requests and sends them all to the GPU only when forced
       
  1042  *  to (during SDL_RenderPresent, when changing render targets, by updating a
       
  1043  *  texture that the batch needs, etc). This is significantly more efficient,
       
  1044  *  but it can cause problems for apps that expect to render on top of the
       
  1045  *  render API's output. As such, SDL will disable batching if a specific
       
  1046  *  render backend is requested (since this might indicate that the app is
       
  1047  *  planning to use the underlying graphics API directly). This hint can
       
  1048  *  be used to explicitly request batching in this instance. It is a contract
       
  1049  *  that you will either never use the underlying graphics API directly, or
       
  1050  *  if you do, you will call SDL_RenderFlush() before you do so any current
       
  1051  *  batch goes to the GPU before your work begins. Not following this contract
       
  1052  *  will result in undefined behavior.
       
  1053  */
       
  1054 #define SDL_HINT_RENDER_BATCHING  "SDL_RENDER_BATCHING"
       
  1055 
       
  1056 
       
  1057 /**
  1033  *  \brief  An enumeration of hint priorities
  1058  *  \brief  An enumeration of hint priorities
  1034  */
  1059  */
  1035 typedef enum
  1060 typedef enum
  1036 {
  1061 {
  1037     SDL_HINT_DEFAULT,
  1062     SDL_HINT_DEFAULT,