PDA

View Full Version : why???!! gw.triangle canot fill the color?


CGGD
04-18-2009, 02:09 PM
fn testDrawTri =
(
gw.setTransform(Matrix3 1)
gw.startTriangles()
gw.triangle #([0,0,0], [50,0,0], [50,50,0]) #(red,red,red)
gw.triangle #([0,0,0], [50,50,0], [0,50,0]) #(green,green,green)
gw.endTriangles()
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
RegisterRedrawViewsCallback testDrawTri
UnRegisterRedrawViewsCallback testDrawTri

CGGD
04-18-2009, 02:11 PM
photo for execute code after
http://forums.cgsociety.org/attachment.php?attachmentid=141281&stc=1

CGGD
04-18-2009, 02:15 PM
how to using gw.polygon?
why, none display


fn TestDrawPoly =
(
gw.setcolor #fill green
gw.polygon #([0,0,0], [0,100,0], [100,0,0]) #(red, blue, green) #([1.0,.5,0], [0.5,0.5,0], [0,0,0.5])
gw.enlargeUpdateRect #whole
gw.updateScreen()
)

RegisterRedrawViewsCallback TestDrawPoly
UnRegisterRedrawViewsCallback TestDrawPoly

ZeBoxx2
04-18-2009, 08:05 PM
both code samples work fine here - try switching to the Software viewport display driver.. if it works with that for you, then it's a driver-related issue.

CGGD
04-19-2009, 08:18 AM
thanks,
i execute this code in software,can display poly....

CGTalk Moderation
04-19-2009, 08:18 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.