feat: add setTransparencyMode to Dart Material class
This commit is contained in:
@@ -35,7 +35,6 @@ extern "C"
|
||||
INVERT // Invert the current value
|
||||
};
|
||||
|
||||
// StencilFace equivalent
|
||||
enum TStencilFace
|
||||
{
|
||||
STENCIL_FACE_FRONT = 1,
|
||||
@@ -43,7 +42,6 @@ extern "C"
|
||||
STENCIL_FACE_FRONT_AND_BACK = 3
|
||||
};
|
||||
|
||||
// Add these enum definitions at the top with the other enums
|
||||
enum TCullingMode
|
||||
{
|
||||
CULLING_MODE_NONE = 0,
|
||||
@@ -52,6 +50,23 @@ extern "C"
|
||||
CULLING_MODE_FRONT_AND_BACK
|
||||
};
|
||||
|
||||
enum TTransparencyMode {
|
||||
//! the transparent object is drawn honoring the raster state
|
||||
DEFAULT,
|
||||
/**
|
||||
* the transparent object is first drawn in the depth buffer,
|
||||
* then in the color buffer, honoring the culling mode, but ignoring the depth test function
|
||||
*/
|
||||
TWO_PASSES_ONE_SIDE,
|
||||
|
||||
/**
|
||||
* the transparent object is drawn twice in the color buffer,
|
||||
* first with back faces only, then with front faces; the culling
|
||||
* mode is ignored. Can be combined with two-sided lighting
|
||||
*/
|
||||
TWO_PASSES_TWO_SIDES
|
||||
};
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE TMaterialInstance *Material_createInstance(TMaterial *tMaterial);
|
||||
EMSCRIPTEN_KEEPALIVE bool MaterialInstance_isStencilWriteEnabled(TMaterialInstance *materialInstance);
|
||||
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setStencilWrite(TMaterialInstance *materialInstance, bool enabled);
|
||||
@@ -98,6 +113,10 @@ extern "C"
|
||||
TMaterialInstance *materialInstance,
|
||||
uint8_t mask);
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE void MaterialInstance_setTransparencyMode(
|
||||
TMaterialInstance *materialInstance,
|
||||
TTransparencyMode transparencyMode);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user