GL_TRIANGLES and COLOR
-
Hi all,
I've tried to draw triangles with a given color. But my triangles stay black !!
I use the method draw from class View with GL_TRIANGLES parameter. This draw method is called
in draw(view) method from Tool class. Color is set with the function drawing_color
See code as example below%(#0000BF)[def draw(view)
color1=Sketchup::Color.new(150,100, 0)
pt=Array.new
pt[0]=Geom::Point3d.new(0,0,0)
pt[1]=Geom::Point3d.new(0,10,0)
pt[2]=Geom::Point3d.new(10,0,10)
view.drawing_color=color1
view.draw(GL_TRIANGLES,pt)
end]Is it possible to colorize my triangle with a chosen color?
Thanks
-
Don't worry.
This looks like a bug (or a feature?) of the API in SU6 and SU7. I never found any workaround.
Why do you think the divider in Stretch happens to be black!?However, in 2D mode (view.draw2d), you can control the color.
Fredo
Advertisement