Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LWJGL/Slick TextureLoader issue

 
Lerner O'Reilly
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to load an image for use with OpenGL via LWJGL and its helper library Slick.
I know, for sure, it has selected the correct image.
When it displays the image, it appears to be fractured slightly.
A more obvious issue would be that when I run the code:

It outputs
Texture loaded: org.newdawn.slick.opengl.TextureImpl@18e3e60
>> Image width: 40
>> Image height: 40
>> Texture width: 64
>> Texture height: 128
>> Texture ID: 1

The image's width should be 40 and its height should be 65.
If I'm not mistaken, shouldn't the image's width and height equal the texture's width and height, respectively, as well?
Thanks for your help!
Crossposted to the Slick forum, here:
http://slick.javaunlimited.net/viewtopic.php?p=21319#21319
 
Rob Spoor
Sheriff
Pie
Posts: 20606
60
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look more closely at line 5, especially what you're printing.
 
Lerner O'Reilly
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
....Thanks. That's really funny... I copied that directly from the official tutorial for the API. I suppose I should go inform them, huh? The fact still remains that the image is coming out fractured, but I suppose I had better start a new topic for that entirely. Every question I have posted here to date has been a really silly syntax error I have overlooked. Thank you for your patience.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lerner O'Reilly wrote:Every question I have posted here to date ...


Why don't you stick with one account, so we can get to know you better?
 
Lerner O'Reilly
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I signed up for an account (this one) using my Yahoo email address, but no email confirmation arrived, even after I tried to resend it . I then created an account with a gmail address and it worked. Later, I tried to log into the gmail account again and my password wasn't working (not surprising since I just transitioned my passwords and couldn't remember it). So, I tried to resend the activation email for this one, and this time it worked. I'll be staying on this account from here on out.
TL;DR: This account didn't work, I created another, now this account started working, so I'll be using this one from now on.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic