Set color for a 3d Cone in OpenGL

I'm learning about OpenGL and I use C# for it. I want to have a red cone and an opportunity to change its transparency.

This is what I do:

Gl.glColor4f(255, 0, 0, alpha);
Glut.glutSolidCone(cone.Radius, cone.Height, cone.Slices, cone.Stacks);

As a result I get something like this:

Cone

So it really is a cone but the color is just white (alpha = 1 when ran).

How to achieve the red color with an ability to make it transparent?



from Recent Questions - Stack Overflow https://ift.tt/3Gn0466
https://ift.tt/3rcl35d

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)