Author Topic: how to change the color of the blit from a texture?  (Read 2140 times)

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
how to change the color of the blit from a texture?
« 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
how to change the color of the blit from a texture?
« Reply #1 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.

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
thanks for your answer.
« Reply #2 on: November 21, 2006, 09:14:58 pm »
you really help me a lot.