Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  TextureLoader changes  (Read 1197 times)
0 Members and 1 Guest are viewing this topic.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Posted 2006-09-28 11:09:07 »

Yesterday I've done a few changes to the TextureLoader. Please have a look at and check them.

You can see, what I've changed when you checkout and synchronize, but to sum it up for short:

There was a "self made" buffering mechanism in the stream loader. It first loaded them into a byte array and resized the array every time it becomes greater than the current avalable size. Well, this is unnecessary, since the next step was to create a ByteArrayInputStream to read from the byte array. I've just shorten the way and let this second step read directly from the input stream (well I've inserted a BufferedInputStream inbetween).

Further, if a TextureStreamLoader begins to read the first bytes of the stream and decides that the current stream doesn't contain data loadable by this loader, it returned null, but didn't reset the stream. I've changed this.

The loadTexture method of the TextureStreamLoader didn't receive the format and mipmap flags as parameters. At least in the TextureStreamLoaderTGA, which I newly added, I needed these parameters. So I added them to the interface, which won't do any harm to the others.

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #1 - Posted 2006-09-28 17:53:46 »

In conclusion, no backward compatibility break, I hope ?

Anyway, one more time, good job  Smiley

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #2 - Posted 2006-09-28 18:00:22 »

In conclusion, no backward compatibility break, I hope ?

No. (Of course not Wink)

Anyway, one more time, good job  Smiley

Thanks Grin
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #3 - Posted 2006-09-28 18:21:08 »

By the way, can we make methods to load texture with a color-transparency ? Ex using jpg with a black background and at load time we specify the transparent color is black and it loads with the correct alpha values.. Would be fine..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #4 - Posted 2006-09-28 18:28:36 »

By the way, can we make methods to load texture with a color-transparency ? Ex using jpg with a black background and at load time we specify the transparent color is black and it loads with the correct alpha values.. Would be fine..

Yes! Cool idea. Please implement this Grin. Maybe it will solve the Q3 transparency problems...
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #5 - Posted 2006-09-28 19:02:00 »

By the way, can we make methods to load texture with a color-transparency ? Ex using jpg with a black background and at load time we specify the transparent color is black and it loads with the correct alpha values.. Would be fine..

Yes! Cool idea. Please implement this Grin. Maybe it will solve the Q3 transparency problems...
Hmm not too much time for now. Remember me of that later.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #6 - Posted 2006-09-28 19:03:58 »

Hmm not too much time for now. Remember me of that later.

OK. I'll put it on the dev-plan 1.0 and attach you as the developer. ok?

But maybe, when I have focus problems again, I'll try to do it myself Wink.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (14 views)
2014-04-15 18:08:23

BurntPizza (12 views)
2014-04-15 03:46:01

UprightPath (25 views)
2014-04-14 17:39:50

UprightPath (11 views)
2014-04-14 17:35:47

Porlus (28 views)
2014-04-14 15:48:38

tom_mai78101 (50 views)
2014-04-10 04:04:31

BurntPizza (109 views)
2014-04-08 23:06:04

tom_mai78101 (209 views)
2014-04-05 13:34:39

trollwarrior1 (177 views)
2014-04-04 12:06:45

CJLetsGame (184 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!