|
|
|
@ -18,6 +18,7 @@ |
|
|
|
|
// Read online: https://github.com/ocornut/imgui/tree/master/docs
|
|
|
|
|
|
|
|
|
|
// CHANGELOG
|
|
|
|
|
// 2021-12-21: Update SDL_RenderGeometryRaw() format to work with SDL 2.0.19.
|
|
|
|
|
// 2021-12-03: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
|
|
|
|
|
// 2021-10-06: Backup and restore modified ClipRect/Viewport.
|
|
|
|
|
// 2021-09-21: Initial version.
|
|
|
|
@ -174,7 +175,11 @@ void ImGui_ImplSDLRenderer_RenderDrawData(ImDrawData* draw_data) |
|
|
|
|
|
|
|
|
|
const float* xy = (const float*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, pos)); |
|
|
|
|
const float* uv = (const float*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, uv)); |
|
|
|
|
const int* color = (const int*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); |
|
|
|
|
#if SDL_VERSION_ATLEAST(2,0,19) |
|
|
|
|
const SDL_Color* color = (const SDL_Color*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.19+
|
|
|
|
|
#else |
|
|
|
|
const int* color = (const int*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.17 and 2.0.18
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Bind texture, Draw
|
|
|
|
|
SDL_Texture* tex = (SDL_Texture*)pcmd->GetTexID(); |
|
|
|
|