This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes LWJGL/Slick TextureLoader issue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "LWJGL/Slick TextureLoader issue" Watch "LWJGL/Slick TextureLoader issue" New topic
Author

LWJGL/Slick TextureLoader issue

Lerner O'Reilly
Greenhorn

Joined: Jun 16, 2011
Posts: 6
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

Joined: Oct 27, 2005
Posts: 19214

Look more closely at line 5, especially what you're printing.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Lerner O'Reilly
Greenhorn

Joined: Jun 16, 2011
Posts: 6
....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

Joined: May 03, 2008
Posts: 4163
    
    3

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?


luck, db
There are no new questions, but there may be new answers.
Lerner O'Reilly
Greenhorn

Joined: Jun 16, 2011
Posts: 6
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.
 
I agree. Here's the link: http://jrebel.com/download
 
subject: LWJGL/Slick TextureLoader issue
 
Similar Threads
Embossing a sprite on an image background
Image smoothing
catch image x, y coordinate
Image width & height return negative
Resizing the image and displaying it