Slick Forums

Discuss the Slick 2D Library
It is currently Wed May 22, 2013 5:34 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Jan 17, 2009 9:34 pm 
Offline
User avatar

Joined: Fri Nov 14, 2008 11:28 am
Posts: 12
hi,

i'm currently experiencing a banding problem when i start my slick game on my pc which has a Nvidia GeForce 6800 built in. the problem does not appear when i start the same game on my laptop with onboard intel graphics. it also does not appear when i use plain lwjgl code on my pc.
to cross-check, i also started one of the slick webstart demos and the banding also appeared there.

i compared my lwjgl display mode selection code and slick's display mode selection code but couldn't find a real difference. there must be some other difference which i don't see right now.

if i always had banding i would assume it's my hardware or maybe old drivers, but it doesn't appear with my lwjgl code.

what do you think about all that?

_________________
rastaduck.org


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2009 9:48 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
The only time I'm experienced banding it's been to do with 16 bit depth display setup. However, if you're not seeing the issues with your normal LWJGL code - unless you're setting the destination pixel format when loading the textures to GL11.GL_RGBA16 - then I'm lost for an explanation.

Have you got a screen shot of banding you're seeing?

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2009 11:29 am 
Offline
User avatar

Joined: Fri Nov 14, 2008 11:28 am
Posts: 12
here's the screenshot. i included the slick logo on the web page in the background for easier comparison.
Image

here's my lwjgl texture creation code. actually it's not my code, i copied it from somewhere.
Code:
private int makeTexture(ByteBuffer pixels, int w, int h) {
    // get a new empty texture
    int textureHandle = allocateTexture();
    // 'select' the new texture by it's handle
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, textureHandle);
    // set texture parameters
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S,
            GL11.GL_REPEAT);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T,
            GL11.GL_REPEAT);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER,
            GL11.GL_LINEAR); // GL11.GL_NEAREST);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER,
            GL11.GL_LINEAR); // GL11.GL_NEAREST);
    // Create the texture from pixels
    GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, w, h, 0,
            GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, pixels);
   
    if ((errorCode = GL11.glGetError()) != 0) {
        logger.log("ERROR: Something is wrong with that texture! (" + errorCode + ")");
    }
           
    pixels.clear();
   
    return textureHandle;
}

_________________
rastaduck.org


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2009 3:04 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
It's the "GL11.GL_RGBA8" which is the difference. I've updated the default to that and it doesn't seem to break anything here.

In SVN.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2009 4:15 pm 
Offline
User avatar

Joined: Fri Nov 14, 2008 11:28 am
Posts: 12
awesome! problem solved.

thx!

when will you release the next version of the slick jar?
i ask because if it will be released soon, i will just wait for it. otherwise i will build it from svn with ant.

_________________
rastaduck.org


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2009 7:38 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I'm waiting for feedback on the last batch and I think its time for a new point release (0.3).

Kev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group