Skip to content
Snippets Groups Projects
  1. Feb 07, 2022
  2. Feb 04, 2022
    • Clownacy's avatar
      Backends: SDL: Added SDL_Renderer* parameter to... · c6cab1f3
      Clownacy authored
      Backends: SDL: Added SDL_Renderer* parameter to ImGui_ImplSDL2_InitForSDLRenderer(). Use SDL_GetRendererOutputSize() instead of SDL_GL_GetDrawableSize() when bound to a SDL_Renderer. (#4927)
      
      This is (kind of) an OpenGL-only function, which should be avoided when SDL2 isn't using OpenGL.
      The only alternative that is recommended is SDL_GetRendererOutputSize, which limits this fix to the SDL_Renderer backend. Still, I think it's better than nothing.
      I say that SDL_GL_GetDrawableSize is "kind of" OpenGL-only because it does technically work even when SDL2 isn't using OpenGL.
      It's just that it becomes a shim to SDL_GetWindowSize, which is not suitable for high-DPI usage because it reflects the size of the window in screen coordinates, not actual pixels, so it really should be avoided when not using OpenGL.
      c6cab1f3
    • Clownacy's avatar
      Backends: SDL_Renderer: Fix texture atlas format on big-endian hardware (#4927) · c39192ba
      Clownacy authored
      SDL_PIXELFORMAT_RGBA32 is intended for byte arrays where the channels
      are specifically in the RGBA order. However, this is not what
      GetTexDataAsRGBA32 does: rather, it constructs an array where each
      pixel is an unsigned int in ABGR order. On little-endian platforms,
      this does indeed result in an RGBA byte order, however, on big-endian
      platforms, this results in an ABGR byte order, which does not match
      the PIXELFORMAT enum.
      
      What should be used is the SDL_PIXELFORMAT_ABGR8888 enum, which
      specifies that the pixels are in native-endian ABGR, which they are.
      c39192ba
  3. Feb 01, 2022
  4. Jan 31, 2022
  5. Jan 29, 2022
  6. Jan 28, 2022
  7. Jan 27, 2022
  8. Jan 26, 2022
    • ocornut's avatar
      Don't merge ImDrawCmd which have had their IdxOffset changed to not be... · 075f4ac6
      ocornut authored
      Don't merge ImDrawCmd which have had their IdxOffset changed to not be sequential. Fixed CTRL+Tab into an empty window causing artefacts on the highlight rectangle due to bad reordering on ImDrawCmd.
      
      This is bit of a weird edge case adding weight to ImDrawCmd merging, if we could rework the mess in RenderDimmedBackgroundBehindWindow() we may be able to undo some of that.
      075f4ac6
  9. Jan 25, 2022
  10. Jan 24, 2022
  11. Jan 22, 2022
  12. Jan 21, 2022
  13. Jan 20, 2022
Loading