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

Errors in renderer when assigning an empty image to TextureButton #41106

Closed
raphipod opened this issue Aug 7, 2020 · 3 comments
Closed

Errors in renderer when assigning an empty image to TextureButton #41106

raphipod opened this issue Aug 7, 2020 · 3 comments

Comments

@raphipod
Copy link

raphipod commented Aug 7, 2020

Godot version: 3.2.2

OS/device including version:

  • Windows 10 (Build 2004)
  • Intel Integrated HD 620, Driver 27.20.100.8425
  • GLES3-Renderer

Issue description:

issue

If i press the highlighted [leer] (which means "empty"), I chose "New Image" on the dropdown-menu, and these errors appear in the output-tab:

GLES2: drivers/gles2/rasterizer_storage_gles2.cpp:810 - Condition "texture->data_size == 0 && !texture->render_target" is true. Returned: Ref()

GLES3: drivers/gles3/rasterizer_storage_gles3.cpp:1101 - Condition "texture->data_size == 0 && !texture->render_target" is true. Returned: Ref()

This happens both in GLES2 and GLES3-Mode. Seems to be a driver issue.

Steps to reproduce:

Open a new project, in the Scene tab, add a Control-Node and add a TextureButton as a child of Control-Node. In the Inspector-tab, choose the "Textures"-dropdown menu, choose "Normal", and add a "New Image-Texture". Then, you can see a option called "Image", which is empty. If pressed, you can choose to add a image by pressing "New Image".

Minimal reproduction project:

TextureButtonIssue.zip

@volzhs
Copy link
Contributor

volzhs commented Aug 7, 2020

you can just drag and drop an image file on it.
texturebutton

is there a particular reason to do those many steps?

@pouleyKetchoupp
Copy link
Contributor

As suggested by @volzhs the proper workflow is to assign an existing image file, either by drag & drop, or by selecting "Load" instead of "New ImageTexture" in the dropdown menu.

The current ux is not really beginner-friendly though so here's a possible improvement:
It would be nice to message the user when assigning an empty texture or image (probably using configuration warning) instead of errors in the renderer.

@pouleyKetchoupp pouleyKetchoupp changed the title TextureButton doesn't let me add an image Errors in renderer when assigning an empty image to TextureButton Aug 9, 2020
@raphipod
Copy link
Author

raphipod commented Aug 9, 2020

@volzhs Oh god, I didn't really think of that. Thanks, this works now.

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

No branches or pull requests

3 participants