mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user