Bugzilla – Bug 40
stencil_func_separate state in GLSL profile doesn't match OpenGL functionality
Last modified: 2010-05-17 04:45:45 PDT
The state "stencil_func_separate" in the schema doesn't match the parameters of the corresponding glStencilFuncSeperate function. This prevents ColladaFX from specifying different ref or mask for different faces. void glStencilFuncSeperate(GLenum face, GLenum func, GLint ref, GLuint mask); The state "stencil_func_separate" is: <xs:element name="stencil_func_separate"> <xs:complexType> <xs:sequence> <xs:element name="front"> <xs:complexType> <xs:attribute name="value" type="gl_func_type" use="optional" default="ALWAYS"/> <xs:attribute name="param" type="xs:NCName" use="optional"/> </xs:complexType> </xs:element> <xs:element name="back"> <xs:complexType> <xs:attribute name="value" type="gl_func_type" use="optional" default="ALWAYS"/> <xs:attribute name="param" type="xs:NCName" use="optional"/> </xs:complexType> </xs:element> <xs:element name="ref"> <xs:complexType> <xs:attribute name="value" type="xs:unsignedByte" use="optional" default="0"/> <xs:attribute name="param" type="xs:NCName" use="optional"/> </xs:complexType> </xs:element> <xs:element name="mask"> <xs:complexType> <xs:attribute name="value" type="xs:unsignedByte" use="optional" default="255"/> <xs:attribute name="param" type="xs:NCName" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element>
Assigned.
Daniel can you comment on this one?
Seems like nothing has been done about this for over 2 years?!? May be the explaination wasn't clear enough? There is a element "stencil_func_separate" in the schema under "gl_pipeline_settings". This shoule clearly match the OpenGL function here: http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuncSeparate.xml glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); Using this function it is possible to specify "func", "ref" and "mask" for front and back facing polygons individually by calling it two times. (One time with face==GL_FRONT, second time with face==GL_BACK.) What the schema element "stencil_func_separate" allows is setting different stencil functions for front and back facing polygons. What is not possible is setting different values for "ref" or "mask" from the opengl function. To fix this "ref" and "mask" in the schema should be moved inside the "back" and "front" elements. For example this is what the xml should look like for the "stencil_func_seperate" element. <stencil_func_separate> <front> <func value="GREATER" /> <ref value="100" /> <mask value="128" /> </front> <back> <func value="ALWAYS" /> <ref value="150" /> <mask value="255" /> </back> </stencil_func_separate> Currently this is what the schema dictates: <stencil_func_separate> <front value="GREATER" /> <back value="ALWAYS" /> <ref value="100" /> <mask value="128" /> </stencil_func_separate>
For this fix to be backward compatible, optional child sequences need to be added to schema. Recommend patching 1.4 (and 1.5) schema and release notes as such.
When looking at the other states that can be set separately by face it might actually be more consistent to fix the schema to require something like this: <stencil_func_separate> <face value="FRONT" /> <func value="GREATER" /> <ref value="100" /> <mask value="128" /> </stencil_func_separate>
Someone was messing with Bugzilla. Fixing fields.
The work group is in the process of deciding on a schedule for schema patches for 1.4 and 1.5, as conformance work is nearly complete.