Examples: Not clearing input data/tex data in atlas (will be required for dynamic atlas anyway). Effectively fix resizing in DX examples.

+ Standardized comments.
This commit is contained in:
ocornut
2015-11-29 14:54:05 +00:00
parent 6269859315
commit 6cee2fca94
9 changed files with 39 additions and 58 deletions

View File

@ -88,9 +88,8 @@ void ImGui_ImplA5_RenderDrawLists(ImDrawData* draw_data)
bool Imgui_ImplA5_CreateDeviceObjects()
{
// Build texture atlas
ImGuiIO &io = ImGui::GetIO();
// Build texture
unsigned char *pixels;
int width, height;
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
@ -125,10 +124,6 @@ bool Imgui_ImplA5_CreateDeviceObjects()
io.Fonts->TexID = (void*)cloned_img;
g_Texture = cloned_img;
// Cleanup (don't clear the input data if you want to append new fonts later)
io.Fonts->ClearInputData();
io.Fonts->ClearTexData();
// Create an invisible mouse cursor
// Because al_hide_mouse_cursor() seems to mess up with the actual inputs..
ALLEGRO_BITMAP* mouse_cursor = al_create_bitmap(8,8);