Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
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 2499 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!
« Reply #4 - Posted 2003-07-19 13:57:18 »

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

Oh, probably this mean that the origin of a PNG is top left... And Ogl textures have their origins at the bottom left.

Now I see why my textures also got bottom-up (however with wood and marble textures you hardly notice it in the first instance).

Thanks for the hint.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

BurntPizza (15 views)
2015-10-07 02:11:23

KaiHH (14 views)
2015-10-06 20:22:20

KaiHH (11 views)
2015-10-06 19:41:59

BurntPizza (24 views)
2015-10-06 19:04:48

basil_ (44 views)
2015-09-30 17:04:40

shadowstryker (22 views)
2015-09-29 15:55:06

TheSpaceHedgehog (28 views)
2015-09-29 01:58:48

GamerC4 (54 views)
2015-09-24 21:10:38

GamerC4 (71 views)
2015-09-24 21:09:48

htuy (28 views)
2015-09-24 04:57:24
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 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‑
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!