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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement