Reuse opengl commands

Mar 20, 2009 at 6:28am

Reuse opengl commands

I am using following set of opengl commands to draw a square using jit.gl.sketch
I provide location and orientation to this message

reset, glmatrixmode modelview, glpushmatrix, glcolor 1 0 0 1, glscale $4 $5, gltranslate $1 $2, glrotate $3 0 0 1, glbegin tri_strip, glvertex -1. -1., glvertex -1. 1., glvertex 1. -1., glvertex 1. 1., glend, glpopmatrix

I can draw one square using this but how do I reuse this commands and draw many squares in different locations?

#42936
Mar 20, 2009 at 8:05pm

jit.gl.multiple is one possibility, probably many others.

#153809

You must be logged in to reply to this topic.