Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
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  
  Texture Mapping  (Read 1341 times)
0 Members and 1 Guest are viewing this topic.
Offline nickdotjava

Junior Member




I have fallen to the dark side.  I'm using DX9


« Posted 2003-06-23 14:28:24 »

I was looking at the examples included with the source, and they use the AWT.  Is there a way to use textures while staying away from AWT?

-Nick

"Oh ya, that's trivial.  I should have it done in an hour."
Offline psiegel

Junior Member




Adamant about gaming.


« Reply #1 - Posted 2003-06-23 14:46:01 »

The way I'm doing it, and the way Cas does it, is to write a class that uses AWT to load images and convert them into a proprietary file format.  Then you can ditch the converter class in your final distributable.  

I could spam this topic with a bunch of source code, but you'd probably be better off just taking a look at how Cas does int SPGL.  Look in the spgl-tools branch, I think it's called something clever like ImageConverter.

Paul

Paul Siegel
Adamant Games, Inc.
http://www.adamantgames.com
Offline nickdotjava

Junior Member




I have fallen to the dark side.  I'm using DX9


« Reply #2 - Posted 2003-06-23 20:50:10 »

So what you're doing is using another class that you've (or CAS) has written that loads the image file using the AWT, and then converts it to your own format?  And your program uses that new format when it's run?

-Nick

"Oh ya, that's trivial.  I should have it done in an hour."
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 361
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2003-06-23 22:01:02 »

Yes.

Cas Smiley

Offline tom
« Reply #4 - Posted 2003-07-05 18:39:29 »

You could also write your own TGA loader. TGA is a standard file format supported by most paint programs. It is easy to write a loader and the format is very well documented. Look at http://www.wotsit.org/ under graphics files.

This way you can use a standard graphics file format without using awt or inventing your own format.

Happy coding!

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #5 - Posted 2003-07-05 22:09:39 »

That's what I've done as well.  I knocked up TGA, SGI/RGB and 24-bit BMP loaders.  I think SGI/RGB was probably the easiest.

Half the fun of writing your own loaders is using paint applications to test your output code to see whether the spec is actually correct.  Many times I've found things like pixel-formats being *slightly* different from reality.  Fun for all the family!

Hellomynameis Charlie Dobbie.
Offline kevglass

JGO Kernel


Medals: 152
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #6 - Posted 2003-07-06 04:46:17 »

Could you make these loaders available as a library, or are they specific to your project?

Kev

Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #7 - Posted 2003-07-14 00:52:49 »

Hi Kev, sorry for the late reply.

Well, they're not specific to my project in that I can pull them out with a couple of utility classes and they'll stand alone, but they are specific in that they only handle what I need - all I can really say is that they work fine for what I use them for, and for files generated by the applications I use!

Ach, give them a go - if they're not what you want, you can always get a good start on writing your own loaders from them.  I've archived them up and written a little readme:

http://www.padcroft.org/cfmdobbie/files/simple_imaging.zip

Hellomynameis Charlie Dobbie.
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.

atombrot (20 views)
2014-08-19 09:29:53

Tekkerue (21 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (55 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (28 views)
2014-08-08 02:01:56

Norakomi (35 views)
2014-08-06 19:49:38

BurntPizza (65 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!