Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGui::ImageButton render transparent image error #8165

Open
chris0306 opened this issue Nov 19, 2024 · 2 comments
Open

ImGui::ImageButton render transparent image error #8165

chris0306 opened this issue Nov 19, 2024 · 2 comments

Comments

@chris0306
Copy link

Version/Branch of Dear ImGui:

Version 1.XX, Branch: XXX (master/docking/etc.)

Back-ends:

imgui_impl_XXX.cpp + imgui_impl_XXX.cpp

Compiler, OS:

GLESv2

Full config/build information:

No response

Details:

ImGui::Image(texid, ImVec2(128, 128), uv0, uv1);

if (ImGui::ImageButton(texid, ImVec2(128, 128))) {
printf("btn clicked!12!!\n");
}

ImGui::Image is right, but imagebutton color is wrong, the edge of "p" image is transparent.
how to solve it , thanks!!!

Screenshots/Video:

ppp

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
ImGui::Begin("Example Bug");
MoreCodeToExplainMyIssue();
ImGui::End();
@GamingMinds-DanielC
Copy link
Contributor

Could be many things, you left out so much information that there is nothing to go on. First you can check the texture format and the blend states with RenderDoc, to see if they are as they should be.

@ocornut
Copy link
Owner

ocornut commented Nov 19, 2024

ImageButton() draws a background frame using the FrameBg colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants