Skip to content

[Question] How to change the image background ? Where to learn about web gl to master this project ? #13

@mystermiam

Description

@mystermiam

I'd like to know how one could change the background image from the rain example Could you help with that. I've tried to by modifying the index.js file where textureRainBg and textureRainFg are created like so in the loadTextures function:

{ name: "textureRainFg", src: "img/weather/doc1.png" }

Doing so, i'm ending up with an error : "Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided." I assumed the image i chose does not meet the requirements to use this function as its a jpeg transformed in a png by just changing the extension. Therefore, I've tried with proper png images, still same errors. Also I don't manage to see where this texImage2D function is called in the canvas creation process. Anyway, what one should use as an image to get it to work ? Where to learn about web gl to master this project ?

Many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions