I had a first look at the OpenGL demo.
Looks and feels terrific!

On simple models fps are 60, which is good.
Complex models naturally draw slower.

Here's a small experiment to show
that having setup and moving initialization
there from the main loop, improves performance:
fps 60 vs 9 (see fragment below).

Setup mechanism can be done in the utility code,
and user code would optionally implement a "setup"
verb, which for exampled could be called from gsinit.
or at least gsinit could return a boolean to indicate,
that it's a first time after context has been created.

Here, due to reusal of context, two areas were
able to move to setup: fonts (lists) and light.
Another area may be geometry lists to move 
to the setup. I will look further.


NB. ===================================================
NB. Font demo
NB. ...

FIRST=: 1

setup=: 3 : 0
  ('arial';80;700;1) glaUseFontOutlines__ogl 32 95 32 0 0.3,WGL_FONT_POLYGONS
  lighttext''
)

paint=: 3 : 0
gsinit GS_LIGHT
if. FIRST do. setup FIRST=: 0 end.
gscolor 3 1 # 0.5 1
NB. ...
NB. ===================================================


__________________________________________________
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

Reply via email to