We'd like to be able to set certain GL states on a per-material basis. For example, consider a material that causes objects to be rendered without depth testing:
Any objects using this material should then be rendered without a depth test and without writing into the depth buffer, causing them to always appear on top of everything else.
All states should match the appropriate WebGL function name (with a gl- prefix) and take appropriate string values as arguments. For example, the gl-cullFaceMode property should take one of BACK, FRONT or FRONT_AND_BACK.
This feature should be confined to the webgl folder of the renderer since it's WebGL specific.
All configurable GL states should also be accessible through the RenderInterface. This should allow users to query the list of changeable states and set a different default state.
The renderer should ensure that the proper states are set during rendering and then reset back to the default after the objects using this material have been drawn.
We'd like to be able to set certain GL states on a per-material basis. For example, consider a material that causes objects to be rendered without depth testing:
Any objects using this material should then be rendered without a depth test and without writing into the depth buffer, causing them to always appear on top of everything else.
All states should match the appropriate WebGL function name (with a
gl-
prefix) and take appropriate string values as arguments. For example, thegl-cullFaceMode
property should take one ofBACK
,FRONT
orFRONT_AND_BACK
.This feature should be confined to the
webgl
folder of the renderer since it's WebGL specific.All configurable GL states should also be accessible through the RenderInterface. This should allow users to query the list of changeable states and set a different default state.
The renderer should ensure that the proper states are set during rendering and then reset back to the default after the objects using this material have been drawn.