Main Menu

Recent posts

#1
Support / Re: Problem with AWTGLCanvas
Last post by AGP - December 04, 2025, 10:52:31 AM
I have a surprising piece of information: I've been trying hardware for running offline AI and I got an excellent computer with an Intel GPU. On AMD and NVidia that problem happens. On the Intel GPU it does not. So I asked that very computer and it suggested the following:

// After you have moved the camera or otherwise changed the viewport size:
GL11.glDisable(GL11.GL_SCISSOR_TEST);          // make sure the old scissor is gone
GL11.glViewport(0, 0, canvas.getWidth(), canvas.getHeight());
GL11.glEnable(GL11.GL_SCISSOR_TEST);           // re‑enable with the *new* dimensions
GL11.glScissor(0, 0, canvas.getWidth(), canvas.getHeight());
#2
Support / Re: Problem with AWTGLCanvas
Last post by EgonOlsen - December 04, 2025, 09:00:11 AM
Maybe...I'll have to look into it to see what the overlay code does exactly.
#3
Support / Re: Problem with AWTGLCanvas
Last post by AGP - December 03, 2025, 09:07:50 PM
The code is only the following. Is it possible that the Overlay class needs attention after this change to AWTGlCanvas?

       fullScreenOverlay = new Overlay(theWorld, 0, 50, (int)(buffer.getWidth()), (int)(buffer.getHeight()-50), "FullInterface");
       fullScreenOverlay.setTransparencyMode(Object3D.TRANSPARENCY_MODE_DEFAULT);
       fullScreenOverlay.setTransparency(250);
#4
Support / Re: Problem with AWTGLCanvas
Last post by AGP - November 13, 2025, 09:27:17 AM
It's bizarre that you compiled. I'll see if I did something weird to the jar.

Yeah, it's like our repair just extended the drawing area. I'll show you the code tomorrow, but it should draw at the ends of the frame, but instead it's not centralized.
#5
Support / Re: Problem with AWTGLCanvas
Last post by EgonOlsen - November 10, 2025, 09:43:06 AM
The last change regarding blit was 8 years ago when I moved from int-parameters to floats. No signature change other than that happened. I tried your line with the latest version, it compiles just fine. I'm not sure why you are having issues with it. What part of it is causing which problem exactly?

About the canvas: I don't know, if I even got the issue? Is it that it's somehow shifted to the left when it's supposed to be centered?
#6
Support / Re: Problem with AWTGLCanvas
Last post by AGP - November 07, 2025, 10:26:54 AM
That line compiles with old jpct versions and not with the latest one.

What about the canvas?
#7
Support / Re: Problem with AWTGLCanvas
Last post by EgonOlsen - November 07, 2025, 08:56:48 AM
I'm not sure what you mean by the missing blit call!? Missing compared to what? Actually, nothing has changed for ages in that regard.
#8
Support / Re: Problem with AWTGLCanvas
Last post by AGP - November 05, 2025, 02:05:09 AM
There's a little problem with the Canvas fix: it's not centering. I've only noticed once I updated jpct on a very centered (fighting) game. Check out the two images. One, naturally, is before the fix, the other one is after. Everything renders in the same place, it's just that the new version doesn't clip on the canvas space.

Also, we're missing a version of blit() because the following line isn't compiling: buffer.blit(splash1, 0, 0, 0, 0, splash1.getWidth(), splash1.getHeight(), buffer.getOutputWidth(), buffer.getOutputHeight(), 200, true);

https://www.dropbox.com/scl/fi/hlz31f7yuhgpusijmhjbw/CanvasFix_before.png?rlkey=rx8al2fz1ani7dz3khprxkgc5&st=cxyi3f3w&dl=0

https://www.dropbox.com/scl/fi/dinizqm379uh1rzaho1qf/CanvasFix_after.png?rlkey=axi07hpkewics8qbfmsgpp65m&st=9ww1q8pb&dl=0
#9
News / Re: Forum upgraded to 2.1.4
Last post by zerh - October 23, 2025, 06:23:23 AM
Quote from: AGP on November 24, 2024, 12:32:49 AMNow all we need is support for a current lwjgl. ; )


Agree, It is needed to make JPCT work on the new Apple chips. :(
#10
Support / Re: Warning: [removal] Float(f...
Last post by EgonOlsen - October 21, 2025, 08:56:01 PM
That's because they want you to use Float.valueOf(...) instead of new Float(...) for ... reasons. valueOf() has been added in 1.5, but jPCT is still being compiled to run with 1.4 to make it possible to run the software renderer on really old machines. If that's reasonable or not is another question, but that's how it is for now.
I don't think that they'll ever remove new Float(...), because it will break lots and lots of old code for no reason other than some guy thinks that it's nicer this way. The same applies to finalize(). It's not advised to use it for your own horrifying purposes for at least a decade now, but they haven't provided any other way to clean up stuff before an instance gets garbage collected by the VM, in case the programmer didn't do it.

If you have something to share, I'll be happy to include it.