objarni's picture

Mini-issue: GL.ClearColor vs. GL.Color

I'm on OpenTK 0.9.1.

- GL.ClearColor has 2 overloads
- GL.Color3 has 26 overloads.

Either one of these two has too few or the other too many ... which is it :)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

GL.ClearColor takes GLClampf (float between 0.0-1.0). GL.Color3 takes everything and converts it to GLClampf. OpenTK also provides a System.Drawing.Color overload for convenience.

In any case GL.Color3 is deprecated now - which, I guess, provides the answer :)

objarni's picture

So what replaces GL.Color3..?

Or you mean deprecated by GL3?

the Fiddler's picture

GL.VertexAttribute and a simple shader (gl_FrontColor = ...).

Talking about GL3, of course, as that's the first version to deprecate functions.

Edit: On topic, I don't think it makes sense to provide GL.ClearColor overloads - just use the built-in conversion operators of C# (or the language of your choice).