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

texturemode(IMAGE) not working #6437

Closed
2 of 17 tasks
peeter2 opened this issue Sep 27, 2023 · 7 comments
Closed
2 of 17 tasks

texturemode(IMAGE) not working #6437

peeter2 opened this issue Sep 27, 2023 · 7 comments

Comments

@peeter2
Copy link

peeter2 commented Sep 27, 2023

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

No response

Web browser and version

No response

Operating System

No response

Steps to reproduce this

Steps:

  1. Check out the reference page: https://p5js.org/reference/#/p5/textureMode
  2. You can see that the shape does not have any texture. Seems to be filled with a single color.

What can be done to fix this? It worked fine in p5.js version 0.9.0.

Thanks

@aferriss
Copy link
Contributor

aferriss commented Sep 27, 2023

Hi @peeter2 , I just checked this in the current main build of p5 and it seems to be fixed. You can take a look at a built binary here.
https://editor.p5js.org/aferriss/sketches/gncwMBiWz

Going to close for organization, but if you feel like this is still an issue feel free to re-open!

@peeter2
Copy link
Author

peeter2 commented Sep 27, 2023

Thanks. That build in your sample seems to be using version 1.7.0 as I see in the p5.js file and seems to work fine.
Hopefully it will also be fixed in the latest CDN file, which currently is not working:
https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.js

@aferriss
Copy link
Contributor

I'm not sure why it says 1.7, but I just built that file from source this morning. Maybe that versioning comment is not being updated correctly

@limzykenneth
Copy link
Member

limzykenneth commented Sep 27, 2023

@peeter2 Just to clarify, the version @aferriss used in the sketch shared is built from the latest main branch of this repo, not 1.7.0. The changes made between 1.7.0 and the main branch has not been released yet and so isn't yet available (but will be once we make a new release, probably soon).

Edit: Actually looking at the reference page I'm not sure, at least the second example, whether it is showing what it is supposed to show. See screenshot below:
Screenshot 2023-09-27 21:48:26

And there seems to be a tendency for the WebGL context to crash with the following warning messages:

WebGL warning: <Present>: Swap chain surface creation failed.
WebGL context was lost. 

@limzykenneth limzykenneth reopened this Sep 27, 2023
@davepagurek
Copy link
Contributor

@limzykenneth is that still happening on the latest main build? it looks like the issue was already captured and solved: #6365

Context loss should probably be opened as a separate issue if that's the remaining one

@limzykenneth
Copy link
Member

limzykenneth commented Sep 27, 2023

I'll see if I can test if it is working on the main build, but I would supposed it is probably fixed in #6365 in this case. (Edit: local test showed that this is working on latest main branch) @peeter2 Can you confirm this is the issue you are seeing on the reference page?

@davepagurek The context loss one is a bit random and tends to follow a short hang of the browser, not very replicable so if you are not seeing it, it may not be a problem.

@peeter2
Copy link
Author

peeter2 commented Oct 3, 2023

Yes, the second example on the reference page shows a blank gray canvas: https://p5js.org/reference/#/p5/textureMode
It should show the image on the canvas, just like in this sketch:

Hi @peeter2 , I just checked this in the current main build of p5 and it seems to be fixed. You can take a look at a built binary here. https://editor.p5js.org/aferriss/sketches/gncwMBiWz

Looking forward to the fixed release.

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

4 participants