I have been getting a little valuable help offline,
but still cannot solve the original problem.

        It seems to me the problem I am facing is with my
two-tier approach in the context of the canonical drawing
scheme of the opengl examples in J demos -- the
makelist/glCallList(s) combination. By two-tier I mean,
first creating a set of display lists of components
containing global nouns like FACECOLOR, DANCERCOLOR, and
SHOECOLOR in one tier and then when I wish to draw the whole
dancers, the second tier involves creating a display list by
glCallList'ing components from the **first** tier for each
dancer and including each dancer's ID number in the list of
display lists, LISTS.  The noun LISTS is central to **all**
of the opengl examples I have studied in the Demos because
they are drawn with the verb stdpaintx for which LISTS is
primary:

stdpaintx =: 11!:2021@(3 : 'glaSwapBuffers glCallLists LISTS')

[Btw, I have to be wrong about the makelist/glCallList(s)
combination as being the only way to draw a new object, but
I cannot find other examples.] To the extent that I am
thinking right, the colors in all of the first tier objects
are being reset to the FACECOLOR, DANCERCOLOR, and SHOECOLOR
which is current when the stdpaintx is executed. So I am not
seeing the desired colors of individual dancers. Please
straighten me out about this. I am missing something
critical.

        Thank you, again.

(B=)

On Mon, 27 Feb 2006, Brian Schott wrote:

+       Trying to be more efficient with drawing mulitple
+ dancers with my opengl turtle graphics system script tgsj,
+ has created a problem for which I am seeking help. The
+ dancers are built with building block components like a
+ face, a torso, arms, legs, and shoes, etc. For efficiency's
+ sake I want to create display lists of the components and
+ assemble a person at a time. Even in the most simplistic
+ situation the dancers' face-, torso- and shoe-colors change
+ often to reflect their dance positions and dancer groupings.
+ To alter the colors while still using the building blocks I
+ have created global nouns like FACECOLOR, DANCERCOLOR, and
+ SHOECOLOR, which are contained in the relevant verbs which
+ define components. I was hoping that I could use opengl
+ verbs like glCallList(s) and glaSwapBuffers and stdpaint(x)
+ (etc) cleverly to use this simple scheme, but I am now
+ worrying that instead I will need to proliferate global
+ nouns like FACECOLOR0, FACECOLOR1, FACECOLOR2, ... ,
+ FACECOLORn-1 and DANCECOLOR0, DANCECOLOR1, DANCECOLOR2, ...
+ , DANCECOLORn-1 and so on, to accomplish this approach for n
+ dancers. Either way, I am committed to having n overall
+ display lists for n dancers, over and above the display list
+ for each building component. I am trying to avoid having n
+ display lists for each color-sensitive component, also. But
+ at present I cannot manipulate the opengl verbs successfully
+ and all the dancers have the same colors. Can somebody
+ explain a way to do this the first way instead of the second
+ way, please?
+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to