Main Menu

Recent posts

#21
Support / Re: Problem with AWTGLCanvas
Last post by AGP - September 25, 2025, 08:58:25 PM
I usually use AWT, but I'll try Swing to see if it's still there. Have you used the Canvas on a AWT frame to see the problem?
#22
Support / Re: Problem with AWTGLCanvas
Last post by EgonOlsen - September 25, 2025, 05:30:37 PM
I'm not of much help here, I'm afraid. I've actually no clue about UI stuff in Java. All I'm usually doing is to open a JFrame/Frame and then draw stuff all by myself.

I dimly remember that others tried to mix an actual UI with the AWTGLCanvas and IIRC, it didn't work our too well (but was possible to a degree). But I couldn't find this thread.

Have you actually tried this approach: https://www.jpct.net/wiki/index226d.html?title=Using_jPCT_in_Swing
#23
Bugs / Re: Can't Switch Between 2D an...
Last post by EgonOlsen - September 25, 2025, 05:27:08 PM
I'm not sure what you are trying to achieve. Do you want to switch between a 2D UI and a 3D render or simply between to renders, one software and one hardware?

I tried the latter with the fps example included in the distribution. For me, it worked fine unless I tried to use Java 2D in fullscreen. With that enabled, I ended up with the desktop being rendered 640*480.

I have no influence on how Java 2D and/or LWJGL are handling things, I'm afraid. Have you tried to disable Java 2D's OpenGL/D3D pipeline?
#24
Bugs / Can't Switch Between 2D and 3D
Last post by AGP - September 25, 2025, 06:58:30 AM
Since I can't use AWTGLCanvas, I'm forced to try to switch to OpenGL rendering like in the following code block. Also, I can't initialize the FrameBuffer without creating the non-AWT frame (and I can't seem to hide it, either). I think that this qualifies as a bug.

                     if (currentScene instanceof Scene3d && lastScene instanceof Scene2d) {//SWITCH FROM 2D to 3D
                         frame.setVisible(false);
                         try{org.lwjgl.opengl.Display.setFullscreen(true);//CRASHING
                         org.lwjgl.opengl.Display.makeCurrent();}catch(Exception e) {}
                         keyMapper = new KeyMapper();
                     }
#25
Support / Re: Problem with AWTGLCanvas
Last post by AGP - September 25, 2025, 05:17:32 AM
Egon?
#26
Support / Re: Problem with AWTGLCanvas
Last post by AGP - September 02, 2025, 09:14:57 PM
Although I should reiterate that I usually use it on the entire frame. I'm making a sometimes-2d sometimes 3d game and it would be available there.
#27
Support / Re: Problem with AWTGLCanvas
Last post by AGP - September 01, 2025, 09:13:01 AM
I've tried everything. Test it out as an actual UI and let me know, please.
#28
Support / Re: Problem with AWTGLCanvas
Last post by EgonOlsen - August 29, 2025, 10:19:07 AM
I've moved the question into a new topic, just in case you are wondering.

I'm not aware of a problem with the location of AWTGLCanvas but then again, I've never really used it in situations where it doesn't use the whole frame. So I never tried to use it as part of an actual UI.

Have to tried to disable Java2D's accelerated rendering pipeline? Maybe it's a problem with that (albeit I doubt it, but it might be worth a try).
#29
Support / Problem with AWTGLCanvas
Last post by AGP - August 26, 2025, 11:58:45 PM
Egon, have you ever run into the problem with AWTGLCanvas in which the entire rendering is out of place on the canvas that I did about a decade ago and ever since on every computer I've ever run my stuff on? I'd love to have that fixed (most likely by switching to lwjgl 3 and convincing them to add AWTGLCanvas back). What do you think?
#30
Projects / Re: Sky Maze 3D
Last post by raft - April 17, 2025, 01:47:56 PM
Thanks Egon! It's always fun to do 3D :)