Hi, I have a problem with frame buffer objects. I want to render to a texture once, then not have to render to it again. I want to draw this texture repeatedly each frame. It never changes. But with FBO, I have to render it each frame, otherwise the image goes black! is there a way to fix this?Thanks,roland

Assuming the OffscreenTexture class does all the necessary setup (glViewport() comes to mind ), your problem is most likely just that you're setting the texture settings before binding the texture. Just move your glTexParameteri()s to after you've bound the texture. Most likely it's not working because the texture is set to using mipmaps ---> the texture is considered incomplete since you don't have mipmaps.

Maybe OffscreenTexture already does this, but try to add a glViewport() call each time you switch render target (= bind or unbind an FBO) to the correct size. Can you also post the code for OffscreenTexture?

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org