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?