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

@ -167,14 +167,13 @@ int32 ImGui_Marmalade_CharCallback(void* SystemData, void* userData)
bool ImGui_Marmalade_CreateDeviceObjects()
{
ImGuiIO& io = ImGui::GetIO();
// Build texture atlas
ImGuiIO& io = ImGui::GetIO();
unsigned char* pixels;
int width, height;
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
// Create texture
// Upload texture to graphics system
g_FontTexture = new CIwTexture();
g_FontTexture->SetModifiable(true);
CIwImage& image = g_FontTexture->GetImage();
@ -187,13 +186,9 @@ bool ImGui_Marmalade_CreateDeviceObjects()
g_FontTexture->SetFiltering(false);
g_FontTexture->Upload();
// Store the pointer
// Store our identifier
io.Fonts->TexID = (void *)g_FontTexture;
// Cleanup (don't clear the input data if you want to append new fonts later)
io.Fonts->ClearInputData();
io.Fonts->ClearTexData();
return true;
}