www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: qjvictor on November 20, 2006, 06:01:03 pm

Title: how to change the color of the blit from a texture?
Post by: qjvictor on November 20, 2006, 06:01:03 pm
I blitted some words and numbers from a texture, but I need to change the color of these dynamically, so is it possible to change it?
Thanks
Title: how to change the color of the blit from a texture?
Post by: EgonOlsen on November 20, 2006, 06:17:07 pm
You either have to use different colored textures for this or manipulate the texture by implementing an ITextureEffect. However, please keep in mind that manipulating a texture's pixel data results in destroying the existing texture and uploading the new one to the graphics card if OpenGL is being used. So in case of the hardware renderer, it will get quite slow when doing this per frame. Doing it once in a while is fine.
Title: thanks for your answer.
Post by: qjvictor on November 21, 2006, 09:14:58 pm
you really help me a lot.