www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: aZen on December 09, 2013, 12:25:05 pm

Title: Texture Access
Post by: aZen on December 09, 2013, 12:25:05 pm
I'm dealing with a lot of textures that are changing rapidly. I'm wondering if it would be possible (or even make sense) to give access to the underlying pixel data of the texture.

Would it make sense to change the pixel data directly opposed to creating a new texture (I'm using the software renderer)? Would the change be visible if the texture is already loaded or would I need to reload it?

Goal is to have less memory allocation. I'm assuming that the underlying pixel data of the image that is used to instantiate the texture is duplicated into the texture. Is that correct or is a reference used?

Thank you!
Title: Re: Texture Access
Post by: EgonOlsen on December 09, 2013, 12:36:43 pm
That's what this was meant for: http://www.jpct.net/doc/com/threed/jpct/ITextureEffect.html (http://www.jpct.net/doc/com/threed/jpct/ITextureEffect.html)
Title: Re: Texture Access
Post by: aZen on December 09, 2013, 01:13:23 pm
That's what this was meant for: http://www.jpct.net/doc/com/threed/jpct/ITextureEffect.html (http://www.jpct.net/doc/com/threed/jpct/ITextureEffect.html)

Sweet! Thank you!