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

Creating new image for ImageTexture logs errors to console #38112

Open
p10tr3k opened this issue Apr 22, 2020 · 4 comments
Open

Creating new image for ImageTexture logs errors to console #38112

p10tr3k opened this issue Apr 22, 2020 · 4 comments

Comments

@p10tr3k
Copy link
Contributor

p10tr3k commented Apr 22, 2020

Godot version:
v3.2.2.rc.custom_build.36a30f681

OS/device including version:
Windows 10

Issue description:
It is not possible to create new image for ImageTexutre in editor. Errors are logged in console:

drivers\gles3\rasterizer_storage_gles3.cpp:1097 - Condition "texture->data_size == 0 && !texture->render_target" is true. Returned: Ref<Image>()
drivers\gles3\rasterizer_storage_gles3.cpp:832 - Condition "!read.ptr()" is true.

Also trying to load image shows warning
image

Steps to reproduce:

  • Add Sprite node
  • Select Sprite
  • In Inspector for Sprite pick ImageTexture for Texture property
  • Click on ImageTexture to expand it
  • Click on [Empty] for Image property
  • Click New Image
@rzil
Copy link

rzil commented Apr 23, 2020

I am having the same issue with ImageTexture. I am using Godot 3.2.1 stable.official on MacOS.

@mrushyendra
Copy link
Contributor

I believe selecting New Image simply creates an empty Image, which is not allowed for an ImageTexture. Instead you need to load an Image resource to use with this texture type.

The second error about having selected a StreamTexture appears because ImageTexture expects an Image datatype. To import an image file (.png, .jpeg, etc.) as an Image, select the file in the editor's filesystem tab, select the Import tab, then select Import As, and select Image as the format.

Also see related: #17650

@Shadowblitz16
Copy link

Ran into this issue when trying to initialize a image for the main box of a custom color picker

@KoBeWi
Copy link
Member

KoBeWi commented Jan 9, 2021

I think this could get similar fix like for #34734

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

7 participants