Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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  
  PNG Images bottom-up?  (Read 3726 times)
0 Members and 1 Guest are viewing this topic.
Offline Caoimhin

Junior Devvie

« Posted 2003-07-18 20:56:33 »

I'm trying to use the PNG loader example in and my textures are loading upside down and backwards.  I'm not real familiar with the PNG format so I don't know if it's normally a bottom-up rather than top-down format.

I can't run the HWShadowmapsSimple example as I only have a GeForce2 card.  But as my textures have text, it became really obvious that something is seriously wrong.

Or is there something with ImageIO that needs to be set to load the image correctly?
Offline tortoise

Junior Devvie

<3 Shmups

« Reply #1 - Posted 2003-07-19 01:10:07 »

Are you sure you're not placing the texture upside down? I've done that a few times since OpenGL does the rather unintuitive lower left being 0,0 business.
Offline TheBohemian

Junior Devvie

Java will rule them all!

« Reply #2 - Posted 2003-07-19 12:39:37 »

... and you have to create your polygons counter-clockwise.
it is not so unfamiliar if you an mathematician ...



my favorite OS:
Java 1.5 -> 1.4 converter:
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gregorypierce

Senior Devvie

I come upon thee like the blue screen of death....

« Reply #3 - Posted 2003-07-19 12:49:37 »

If you load in .png images with ImageIO you will have to do an Affine transform to flip them.

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161