Color Opengl at Color

Color Opengl. Show activity on this post. That is, each color has a red, green, blue, and alpha component.

Tutorial 4 A Colored Cube
Tutorial 4 A Colored Cube from www.opengl-tutorial.org

That tells opengl your material properties are going to be defined with the glcolor () function, it can be expanded on but that should get you what you expect. Glcolor3 variants specify new red, green, and blue values explicitly and set the current alpha value to 1.0 (full intensity) implicitly. Make sure you do this after the window has been created and an appropriate pixelformat has been set for the window, and the gl context has been created.

Tutorial 4 A Colored Cube

#declare pink = color red 0.737255 green 0.560784 blue 0.560784 #declare plum = color red 0.917647 green 0.678431 blue 0.917647 #declare salmon = color red 0.435294 green 0.258824 blue 0.258824 #declare seagreen = color red 0.137255 green 0.556863 blue 0.419608 #declare sienna = color red 0.556863 green 0.419608 blue 0.137255 The background color is preset in the init() routine by the command glclearcolor(0,0,0,0); A painter's palette provides spaces to mix paints together; Gl.glclearcolor(float red, float green, float blue, float alpha) glclearcolor(0.0,0.0,1.0,0.0);//dark blue.