AWTGLCanvas or fullscreen, General OGL design question

Started by christianjacquet, July 08, 2007, 20:15:27

Previous topic - Next topic

christianjacquet

I am using eclipse IDE and lwjgl to write a 3D tile based game.
The picture below show what it looks like now.
I have one window with three panels, one for chat-area, one
for control/inventory etc. and the third is an AWTGLCanvas
for the game-world.

General question:
Is it a bad idea to use an AWTGLCanvas instead of a fullscreen
OGL window? It seemed easier this way so I could use SWT/Swing
components for buttons, text areas etc.

Problem:
The only problem I see so far is that every time I write something to
a text area (outside the AWTGLCanvas), the canvas is repainted.
And everytime it is repainted it flickers.
My plan is to have the game area repainted every 1/30s, with no flicker.
The game is relatively low poly at average 5000 polygones.

Please let me know if I am heading in the wrong direction with this
kind of window setup and if you know why my canvas are repainted
when I dont expect it to be.



Sincerely
Christian

Matzon

The best performance is by far from the native display instead of using AWT. As for the flickering, I am not entirely sure why that would happen?
Though it may be nice to use swing components, I've found that UI like that doesn't really feel right.
Depending on the type of game, you might want to look at slick (2d) or jme (3d)

CaptainJester

You could also look at FengGUI.  It is a full GUI that is made for LWJGL and JOGL.  So you can use it instead of Swing and go fullscreen.

https://fenggui.dev.java.net/
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

Fool Running

QuoteYou could also look at FengGUI.  It is a full GUI that is made for LWJGL and JOGL.  So you can use it instead of Swing and go fullscreen.
I need to stop trying to re-invent the wheel and just ask you guys where to find stuff. ::) That looks like it will save me a lot of time. ;D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D