KhronosGroup / OpenGL-Registry

OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
679 stars 274 forks source link

ES 2.0 spec mistake? #483

Closed bbbbx closed 2 years ago

bbbbx commented 3 years ago

Hi, I'm a little confused about the ES 2.0 specification.

ES 2.0 Spec, 3.5.1 Basic Polygon Rasterization, it said

Setting dir to CCW (corresponding to counter-clockwise orientation of the pro- jected polygon in window coordinates) indicates that the sign of a should be reversed prior to use. Setting dir to CW (corresponding to clockwise orientation) uses the sign of a is as computed above.

however, 3.6.1 Basic Polygon Rasterization of ES 3.0 Spec, it said

Setting dir to CCW (corresponding to counter-clockwise orientation of the projected polygon in window coordinates) uses a as computed above. Setting dir to CW (corresponding to clockwise orientation) indicates that the sign of a should be reversed prior to use.

ianromanick commented 2 years ago

I believe that this was just a bug fix in OpenGL ES 3.0. OpenGL ES 2.0 was based on desktop OpenGL 1.3, and section 2.13.1 (Lighting) indicates that CW should negate the calculated value. It's in a different part of the spec, and it's worded in a different way. My guess is that there was just a mistake made when things were moved around in the ES 2.0 spec.

pdaniell-nv commented 2 years ago

Also note that when things are fixed in later core specifications, those fixes aren't propagated back to older core specifications.