Hello Guest

binding texture to a quad..... ????

  • 21 Replies
  • 27926 Views
Re: binding texture to a quad..... ????
« Reply #15 on: September 18, 2009, 12:03:04 »
I think it is more suitable than PNG. PNG offers custom compression and a its not that easy to read a png file when not using helpers like ImageIO. The drawback of TGA is that it comes with no compression and RLE is not really an issue to take care about. But it is very easy to read/write imho.

But as you said you're going for a graphics application and not a game i understand your point in adding PNG support.
« Last Edit: September 18, 2009, 12:50:28 by Evil-Devil »

*

Offline NateS

  • **
  • 91
    • Esoteric Software
Re: binding texture to a quad..... ????
« Reply #16 on: September 18, 2009, 12:26:43 »
In TWL, there is a possibly newer version of the PNG loader that is in Slick (same author, MatthiasM):
http://twl.l33tlabs.org/

Re: binding texture to a quad..... ????
« Reply #17 on: September 18, 2009, 15:14:12 »
Hola.
I am getting an exception when loading rle tga. Here is the exception:
Code: [Select]
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 524288
        at com.gaanza.engine.test.TGALoader.loadCompressedData(TGALoader.java:119)
        at com.gaanza.engine.test.TGALoader.<init>(TGALoader.java:51)
        at com.gaanza.engine.test.WindowTest.init(WindowTest.java:96)
        at com.gaanza.engine.test.WindowTest.main(WindowTest.java:35)
Java Result: 1

and line which is throwing an exception is:
Code: [Select]
                   textureData[currentByte]=colorBuffer[0];    //R byte

Help !!

Gracias.
« Last Edit: September 18, 2009, 15:16:19 by padam1989 »

Re: binding texture to a quad..... ????
« Reply #18 on: September 21, 2009, 11:45:09 »
Weird, did the RLE work with the provided LWJGL TGA RLE file or does it crash too? Because i tested the tutorial code with both files and both had been displayed/loaded fine.

Re: binding texture to a quad..... ????
« Reply #19 on: September 28, 2009, 07:16:40 »
Weird, did the RLE work with the provided LWJGL TGA RLE file or does it crash too?

I was talking about the TGA RLE file that was provided by the tutorial. non-RLE file worked fine but RLE didn't worked.

Gracias.

Re: binding texture to a quad..... ????
« Reply #20 on: September 28, 2009, 10:51:20 »
Yea, that is what me makes wondering. Because the TGA RLE i put into the archive worked when i wrote and testet the tutorialcode. Will check it when iam home.

Re: binding texture to a quad..... ????
« Reply #21 on: September 28, 2009, 18:37:08 »