io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits for OpenGL3 demo because it is more likely to be compatible with user's existing shader.
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits for OpenGL3 demo because it is more likely to be compatible with user's existing shader.
@ -161,16 +161,17 @@ void ImGui_ImplGlfwGL3_CharCallback(GLFWwindow*, unsigned int c)
io.AddInputCharacter((unsignedshort)c);
io.AddInputCharacter((unsignedshort)c);
}
}
voidImGui_ImplGlfwGL3_CreateFontsTexture()
boolImGui_ImplGlfwGL3_CreateFontsTexture()
{
{
ImGuiIO&io=ImGui::GetIO();
// Build texture atlas
// Build texture atlas
ImGuiIO&io=ImGui::GetIO();
unsignedchar*pixels;
unsignedchar*pixels;
intwidth,height;
intwidth,height;
io.Fonts->GetTexDataAsRGBA32(&pixels,&width,&height);// Load as RGBA 32-bits for OpenGL3 demo because it is more likely to be compatible with user's existing shader.
io.Fonts->GetTexDataAsRGBA32(&pixels,&width,&height);// Load as RGBA 32-bits for OpenGL3 demo because it is more likely to be compatible with user's existing shader.
io.Fonts->GetTexDataAsRGBA32(&pixels,&width,&height);// Load as RGBA 32-bits for OpenGL3 demo because it is more likely to be compatible with user's existing shader.
io.Fonts->GetTexDataAsRGBA32(&pixels,&width,&height);// Load as RGBA 32-bits for OpenGL3 demo because it is more likely to be compatible with user's existing shader.