Problem with AWTGLCanvas

Started by AGP, August 26, 2025, 11:58:45 PM

Previous topic - Next topic

AGP

Exception in thread "main" java.lang.NoClassDefFoundError: com/threed/jpct/AWTJPCTCanvas$1
        at com.threed.jpct.AWTJPCTCanvas.init(AWTJPCTCanvas.java:53)
        at com.threed.jpct.AWTJPCTCanvas.<init>(AWTJPCTCanvas.java:38)
        at com.threed.jpct.AWTGLRenderer.init(AWTGLRenderer.java:73)
        at com.threed.jpct.FrameBuffer.enableRenderer(FrameBuffer.java:1154)
        at com.threed.jpct.FrameBuffer.enableGLCanvasRenderer(FrameBuffer.java:739)

EgonOlsen

Opps, I missed that. I've updated the download, please try again.

AGP

It works, thanks a lot. I'm glad jpct is back at form. Actually, my standalone GLB importer is nearly perfect now. I have a script for splitting animations inside Blender and exporting multiple clips straight into jpct, so it's better than at form.

AGP

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

EgonOlsen

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.

AGP

That line compiles with old jpct versions and not with the latest one.

What about the canvas?

EgonOlsen

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?

AGP

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.