1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-09-23 19:18:34 +02:00

Comments + Metal using SetTexID(0) for consistency.

This commit is contained in:
ocornut 2023-04-11 11:20:29 +02:00
parent e92b29ad53
commit 9203883bbe
5 changed files with 7 additions and 4 deletions

View File

@ -344,7 +344,7 @@ void ImGui_ImplMetal_DestroyFontsTexture()
ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
ImGuiIO& io = ImGui::GetIO();
bd->SharedMetalContext.fontTexture = nil;
io.Fonts->SetTexID(nullptr);
io.Fonts->SetTexID(0);
}
bool ImGui_ImplMetal_CreateDeviceObjects(id<MTLDevice> device)

View File

@ -18,7 +18,7 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2023-04-06: Inputs: Avoid callng SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306)
// 2023-04-06: Inputs: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306)
// 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen. (#2702)
// 2023-02-23: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644)
// 2023-02-07: Implement IME handler (io.SetPlatformImeDataFn will call SDL_SetTextInputRect()/SDL_StartTextInput()).

View File

@ -19,7 +19,7 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2023-04-06: Inputs: Avoid callng SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306)
// 2023-04-06: Inputs: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306)
// 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen. (#2702)
// 2023-02-23: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644)
// 2023-02-07: Forked "imgui_impl_sdl2" into "imgui_impl_sdl3". Removed version checks for old feature. Refer to imgui_impl_sdl2.cpp for older changelog.

View File

@ -80,7 +80,7 @@ Other changes:
- Backends: Win32: Added support for io.AddMouseSourceEvent() to discriminate Mouse/TouchScreen/Pen. (#2334, #2702)
- Backends: SDL2/SDL3: Added support for io.AddMouseSourceEvent() to discriminate Mouse/TouchScreen.
This is relying on SDL passing SDL_TOUCH_MOUSEID in the event's 'which' field. (#2334, #2702)
- Backends: SDL2/SDL3: Avoid callng SDL_StartTextInput()/SDL_StopTextInput() as they actually
- Backends: SDL2/SDL3: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they actually
block text input input and don't only pertain to IME. It's unclear exactly what their relation
is to other IME function such as SDL_SetTextInputRect(). (#6306, #6071, #1953)
- Backends: GLFW: Added support on Win32 only for io.AddMouseSourceEvent() to discriminate

View File

@ -3249,6 +3249,9 @@ void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end
// Default clip_rect uses (pos_min,pos_max)
// Handle clipping on CPU immediately (vs typically let the GPU clip the triangles that are overlapping the clipping rectangle edges)
// FIXME-OPT: Since we have or calculate text_size we could coarse clip whole block immediately, especally for text above draw_list->DrawList.
// Effectively as this is called from widget doing their own coarse clipping it's not very valuable presently. Next time function will take
// better advantage of the render function taking size into account for coarse clipping.
void ImGui::RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_display_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect)
{
// Perform CPU side clipping for single clipped element to avoid using scissor state