Author Topic: Texture reloading just turns objects white  (Read 6641 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture reloading just turns objects white
« Reply #15 on: October 19, 2012, 07:15:07 am »
You have to make the implementation return true in containsAlpha() to enable alpha support for the ITextureEffect. About the PixelArray...might be something wrong with it. I never tested it, it was just meant to be a simple example of one way to do it.

Offline Cowbox

  • int
  • **
  • Posts: 58
  • >:D
    • View Profile
    • Soharix
Re: Texture reloading just turns objects white
« Reply #16 on: October 19, 2012, 12:12:36 pm »
:D!!!!!!!!!!! It's alive!!!!!! (I completely didn't see that method. How did I miss that. xD)

It makes sense now why it turned blue instead of using an alpha channel. (What with the whole BGR and ABGR stuff :D)

Thank you so much for your help. :D

I shall now concentrate on ironing out some other problems this method has and tone down how much I'm storing in arrays.

Offline Cowbox

  • int
  • **
  • Posts: 58
  • >:D
    • View Profile
    • Soharix
Re: Texture reloading just turns objects white
« Reply #17 on: October 19, 2012, 01:28:38 pm »
Just a quick question now:

Is there a way to set the GLFiltering based on an object rather than a texture?

If I'm having to update the non filtered one and the filtered one simultaneously the program slows back down. :(

I want to be able to update one and use that in filtered and non filtered form on 2 different objects. :O

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture reloading just turns objects white
« Reply #18 on: October 19, 2012, 08:33:45 pm »
No. Filtering in GL is defined when uploading the texture. Maybe it's an option to use two textures instead?

Offline Cowbox

  • int
  • **
  • Posts: 58
  • >:D
    • View Profile
    • Soharix
Re: Texture reloading just turns objects white
« Reply #19 on: October 19, 2012, 08:34:59 pm »
Maybe what's an option to use 2 textures instead of what xD?

I'm already using 2 textures.

(I'm having to update the shadow layer concurrently, which I don't really like. :( )

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture reloading just turns objects white
« Reply #20 on: October 19, 2012, 08:45:44 pm »
Instead of one...if you are using two, use four...i don't know. But you can't base filtering on the object, so you have to do it based on the textures and my idea was to use the same texture twice, one filtered and one unfiltered.

Offline Cowbox

  • int
  • **
  • Posts: 58
  • >:D
    • View Profile
    • Soharix
Re: Texture reloading just turns objects white
« Reply #21 on: October 19, 2012, 08:47:27 pm »
Nono, I'm saying, that's exactly what I already have. xD

I have 2 sets of textures, one set is unfiltered, one set it filtered.

I wanted to find a way to only edit one texture but it affect both filtered and unfiltered because if I edit 2 in 1 call, it slows the FPS down. :(

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture reloading just turns objects white
« Reply #22 on: October 19, 2012, 08:55:06 pm »
I see...no, there's no other way.