This is great news. I would think of the following:
User code:
- setup -- for a new scene
- update -- for new size (optional)
- paint -- for every frame
- "setup" (init) verb will do initial
calculation and create lists
- the paint verb will only call lists
OpenGL API:
- alloc: new OpenGL context -- on create
- reset (or release/alloc) -- on scene change \__ may be the same
- update: coordinate change -- on resize /
- beforePaint -- before user paint
- afterPaint -- after user paint
- release
- "reset" function to initialize the OpenGL
context. (such as when switching to a new sceen
with different light, etc, settings). This can
easily be done by releasing and allocating new
OpenGL context.
- otherwise a lot of state can be shared beween
frames, such as light, etc. (most of the gsinit)
- beforePaint will only update position/rotation
Also there need to be examples how to
share lists within lists. Like the balls demos:
spheres are lists. But we need to include
them in the overall scene list.
> scene, and don't alloc for the next frame. You need to create the lists
> again when the control is resized.
I am not sure, that it's a fact. Unless, dictated by
the context/bitmap creation. I would look into how
to preserve OpenGL context when switching to a new
or updated DC.
--- Chris Burke <[EMAIL PROTECTED]> wrote:
> Oleg Kobchenko wrote:
> > That's a great idea to share lists between frames,
> > if only j601 allowed it.
>
> You can share lists between frames. Use draw_keep__ogl to draw the
> scene, and don't alloc for the next frame. You need to create the lists
> again when the control is resized.
>
> This takes a little housekeeping, and examples will be in the next beta.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm