glStencilFuncSeparate has wrong parameter names

Project:Tao.OpenGl
Component:Code
Category:bug
Priority:minor
Assigned:Unassigned
Status:Active
Description

The above mentioned function has the following prototype:

public static void glStencilFuncSeparate(int frontfunc, int backfunc, int @ref, int mask);

According to the reference (and experience), this should be changed to:

public static void glStencilFuncSeparate(int face, int func, int @ref, int mask);

The first parameter is one of:
GL_FRONT, GL_BACK or GL_FRONT_AND_BACK.

The second parameter is the function, one of:
GL_NEVER, GL_LESS, GL_LEQUAL, GL_GREATER, GL_GEQUAL, GL_EQUAL, GL_NOTEQUAL, or GL_ALWAYS.

Thanks for all your hard work so far.

From

From http://opengl.org/registry/api/gl.spec:


StencilFuncSeparate(frontfunc, backfunc, ref, mask)
return void
param frontfunc StencilFunction in value
param backfunc StencilFunction in value
param ref ClampedStencilValue in value
param mask MaskedStencilValue in value
category VERSION_2_0
version 2.0
extension
glxropcode ?
glxflags ignore
glsopcode ?
offset ?

where StencilFunction is defined as:

StencilFunction enum:
use AlphaFunction NEVER
use AlphaFunction LESS
use AlphaFunction EQUAL
use AlphaFunction LEQUAL
use AlphaFunction GREATER
use AlphaFunction NOTEQUAL
use AlphaFunction GEQUAL
use AlphaFunction ALWAYS

It may be that the parameters are misplaced (note that both become ints, so the problem might go unnoticed in the C headers). You'll have to provide some official documentation to justify the change.

------
OpenTK

From OpenGL 2.1 Reference

From OpenGL 2.1 Reference Pages: http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuncSeparate.xml

Tried it, it works as advertised in the above document. All the glGet* check out.

Theme by La Boite a site | Powered by Drupal