Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
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  
  LWJGL Bug Report...  (Read 2721 times)
0 Members and 1 Guest are viewing this topic.
Offline Chman

Junior Devvie

Nothing more that... Java games are cool !

« Posted 2002-10-18 16:54:14 »

hi everybody...
i think i've found a bug... i wrote two java programs : one with lwjgl, and the other with gl4java (exactly the same program), but the output is different !
look at this piece of code :

  gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-13.3f, -10.0f, 10.0f);
  gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 13.3f, -10.0f, 10.0f);
  gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 13.3f, 10.0f, 10.0f);
  gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-13.3f, 10.0f, 10.0f);

and look at the gl4java's one :

  gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(-13.3f, -10.0f, 10.0f);
  gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f( 13.3f, -10.0f, 10.0f);
  gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f( 13.3f, 10.0f, 10.0f);
  gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(-13.3f, 10.0f, 10.0f);

you see, it's the same things... but when i run the lwjgl program, the texture coordinates are inverted... i don't know if you understand me because i don't speak english very well (french......)...

please help... i can't find a solution...
Offline princec

« JGO Spiffy Duke »

Medals: 555
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #1 - Posted 2002-10-19 08:51:56 »

I can categorically state (famous last words!) that it's not LWJGL, and the problem lies somewhere in texture loading. I know it works properly - because all of my code uses it and it does what I expect it to - so something different is happening under GL4Java.

Cas Smiley

Offline cknoll

Junior Devvie

Flame On!

« Reply #2 - Posted 2002-10-22 12:27:07 »

You're gonna have to make a C++ program that uses the API exactly the same way to see what the 'tie-breaking' result is.

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

« JGO Spiffy Duke »

Medals: 555
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #3 - Posted 2002-10-22 18:58:30 »

Under LWJGL (and straight C), the quad drawn by that code should look "upsidedown" from the texture as loaded. If this ain't happening in GL4Java it's because GL4Java is inverting the texture for you. Which is a bit naughty as it shouldn't, you should either knowingly invert your textures, or like I do, swap the 1.0s and 0.0s texture T coordinates around.

Cas Smiley

Offline Chman

Junior Devvie

Nothing more that... Java games are cool !

« Reply #4 - Posted 2002-10-23 03:29:26 »

thx! now it works...

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

Jesse (11 views)
2015-07-29 04:35:27

Riven (33 views)
2015-07-27 16:38:00

Riven (17 views)
2015-07-27 15:35:20

Riven (20 views)
2015-07-27 12:26:13

Riven (10 views)
2015-07-27 12:23:39

BurntPizza (29 views)
2015-07-25 00:14:37

BurntPizza (40 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (27 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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!