i'm a new JOGL
user and i'm trying to implement some functions with for a future game.
My GLEventListener
display function just call a function for each entity with the same GL2
instance as argument.
Currently i'm trying to render animated entities with textures.
So i had loaded TextureData
( via TextureIO
) in the constructor and i'm just building Texture ( via TextureIO and textureData ) and render it with the classic gl.glBegin(GL2.GL_QUAD) --- gl.glEnd()
.
But with two entities like this my PC become totally bugged : it look to work but every graphics are definitely freeze, and i need to manually reboot.
So i've tried to slow down the display function by making the thread sleep. And surprise no more crash. BUT : with 1 render every 30ms it still crash and with 200ms it do not.
It look to work for my PC, but what if another PC can handle a 20ms refresh ?
.
It clearly look to not be the best way to do.
If my pc cannot go so fast, the app should be "late" and my PC shouldn't bug like that right ?
Does the problem come from JOGL
configuration / initialization ? Or it just come from my hardware ( i915 graphic card :/
) ?
And wherever he comes, what is the best way to handle it ?
I've look a lot at google, but i didn't find a similar topic, so i'm directly asking to you :)
Thx.