frames per second stuff (i'm thick)

Heyhey!

I’m still pretty new to most of the whole JOGL stuff and I’m struggling a bit with frames per second based rendering…
I wondered if there was a way to call display repeatedly without using an FPSAnimator…
I just dunno how to pass it the GLAutoDrawable :S

Feel free to tear me a new one if i’m being daft about this, (as i think i might be) lol :stuck_out_tongue:

Thanks,

Mal

Yep… you can just call display repeatedly without using FPSAnimator. Just keep a reference to your drawable and call it at leisure, pretty much. I recommend looking at the source code of Animator / FPSAnimator - that should help demystify it.

I don’t use any Animator and I get better performance for unknown reasons… My source code is freely available, have a look if needed.

So the drawable really is just a sort of initial context for you to build on?
i thought it was more something that needed fetching from somwhere or other each time,
sort of like the Graphics object in 2d swing stuff.

Or have i got that wrong too?

thanks again!

The GL object is as you describe, more or less, but the drawable less so. For example, it seems to work ok to keep a reference to a GLCanvas, attach a MouseMotionListener to it, and call display() on it when the mouse is dragged - handy if you’ve got something like a 3d viewer with a non-animated model. I don’t guarantee that this is totally right and proper, but as far as I know it is pretty much fine. For example, I have an application at xinaesthetic.net which does this for 12 small panels and is not perfect but seems to run ok most of the time™.

If anyone knows why this should be a problem, I’d like to hear from them.

I did something similar with a medical viewer with 3d textures but I just didn’t know it applied to the drawable as well,

anyhoo, thanks a lot everybody, you’ve cleared my little problem up quite a bit!

Mal