a couple more questions

  1. I still can’t get things to render properly. What is wrong with the following?

         gl.disable(GL.TEXTURE_2D);
         gl.blendFunc(GL.ONE,GL.ZERO);
         board.render(gl);
         
         gl.enable(GL.TEXTURE_2D);
         gl.blendFunc(GL.SRC_ALPHA,GL.ONE);
         gl.color3f(1.0f,1.0f,0f);
         gl.bindTexture(GL.TEXTURE_2D,textures[0]);
         gl.begin(GL.QUADS);
               gl.texCoord2f(0,1);
               gl.vertex2f(mouseX,mouseY);
               gl.texCoord2f(0,0);
               gl.vertex2f(mouseX,mouseY+16);
               gl.texCoord2f(1,0);
               gl.vertex2f(mouseX+16,mouseY+16);
               gl.texCoord2f(1,1);
               gl.vertex2f(mouseX+16,mouseY);
         gl.end();
    

The cursor ends up being blended with what is already on the screen. Changing the blending mode just makes it so the black transparency shows up. What am I doing wrong?

  1. I would rather have my game in a window (yes I know that it is meant to be a debug mode). Is there any way to share the Windows cursor (for lack of a better description)? I.E. when the cursor reaches the edge of the Display boundries it hops out into the Windows environment.

  2. What does Sys.getTimerResolution() do? Is it measured in ticks per millisecond?

Thanks for the help :).

  1. gl.blendFunc(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA); You will need an alpha channel for the mouse texture.

  2. Tough :slight_smile: Hack the library about yourself!

  3. Ticks per second.

Cas :slight_smile:

I know you can save alpha channels in a .png but I just can’t get Photoshop (or any paint program for that matter) to do it. Is there some secret trick?

I will now reveal the best kept secret in the history of Photoshop! Ok, be sure not to fall out of your chair now!
He he he…
I had a hard time finding the answer for that one as well, and the simple answer is this following procedure:

a) Create an image without a background layer (says itself, transparent).
b) Go to channels and add a new channel (should be R, G, B and now Alpha 1 <-- the new one)
You´re all done! Save as… and then choose PNG.
Remember to keep your texture sizes 2^n :wink: