cturtle/mesh_pipeline
include "cturtle/mesh_pipeline";
Types
MeshPipelineVertexAttribute
Object
| Field | Type | Writable | Description |
|---|---|---|---|
location | int | yes | |
type | int | yes | |
offset | int | yes |
MeshPipelineMeshDesc
Object
| Field | Type | Writable | Description |
|---|---|---|---|
name | string | yes | |
attributes | array<int> | yes | |
stride | int | yes | |
layout | array<MeshPipelineVertexAttribute> | yes | |
instanceStride | int | yes | |
instanceLayout | array<MeshPipelineVertexAttribute> | yes |
MeshPipelinePassDesc
Object
| Field | Type | Writable | Description |
|---|---|---|---|
name | string | yes | |
mesh | MeshPipelineMesh | yes | |
shader | string | yes | |
program | string | yes | |
disabled | bool | yes | |
disableDepthTest | bool | yes | |
disableDepthWrite | bool | yes |
MeshPipelineOutputDesc
Object
| Field | Type | Writable | Description |
|---|---|---|---|
name | string | yes | |
format | int | yes | |
clear | array<float> | yes |
MeshPipelineSamplerDesc
Object
| Field | Type | Writable | Description |
|---|---|---|---|
filter | int | yes | |
wrap | int | yes | |
mipmaps | bool | yes |
MeshPipelineMesh
Object
| Field | Type | Writable | Description |
|---|---|---|---|
id | int | yes |
upload infallible
infallible fn upload(array<float> vertices, array<int> indices) -> bool
uploadBytes infallible
infallible fn uploadBytes(array<byte> vertices, array<int> indices) -> bool
uploadInstances infallible
infallible fn uploadInstances(array<byte> data) -> bool
MeshPipelineImage
Object
| Field | Type | Writable | Description |
|---|---|---|---|
id | int | yes |
upload infallible
infallible fn upload(string path, bool srgb) -> bool
MeshPipelinePass
Object
| Field | Type | Writable | Description |
|---|---|---|---|
id | int | yes |
lighting infallible
infallible fn lighting(bool enabled) -> bool
shadow infallible
infallible fn shadow(string shader, string program) -> bool
addOutput
fn addOutput(MeshPipelineOutputDesc desc) -> MeshPipelineImage
bindImage infallible
infallible fn bindImage(string shaderName, MeshPipelineImage image) -> bool
bindSampler infallible
infallible fn bindSampler(string shaderName, MeshPipelineSamplerDesc desc) -> bool
uniform infallible
infallible fn uniform(string block, array<float> values) -> bool
uniformBytes infallible
infallible fn uniformBytes(string block, array<byte> values) -> bool
setEnabled infallible
infallible fn setEnabled(bool enabled) -> bool
MeshPipeline
Object
| Field | Type | Writable | Description |
|---|---|---|---|
id | int | yes |
addMesh
fn addMesh(MeshPipelineMeshDesc desc) -> MeshPipelineMesh
addImage
fn addImage(string name) -> MeshPipelineImage
addPass
fn addPass(MeshPipelinePassDesc desc) -> MeshPipelinePass
validate infallible
infallible fn validate() -> bool
install
fn install() -> bool
replaceInstalled
fn replaceInstalled() -> bool
destroy
fn destroy() -> bool
discardDraft infallible
infallible fn discardDraft() -> bool
dimensions infallible
infallible fn dimensions(array<float> output) -> bool
status infallible
infallible fn status() -> int
errorMessage infallible
infallible fn errorMessage() -> string
inspect infallible
infallible fn inspect() -> string
mesh
fn mesh(string name) -> MeshPipelineMesh
image
fn image(string name) -> MeshPipelineImage
pass
fn pass(string name) -> MeshPipelinePass
Functions
meshPipelineLoad infallible
infallible fn meshPipelineLoad(string asset) -> task<bool>
meshPipelineMesh infallible
infallible fn meshPipelineMesh(
string mesh,
array<float> vertices,
array<int> indices) -> bool
meshPipelineImage infallible
infallible fn meshPipelineImage(string image, string path, bool srgb) -> bool
meshPipelineUniform infallible
infallible fn meshPipelineUniform(
string pass,
string block,
array<float> values) -> bool
meshPipelinePassEnabled infallible
infallible fn meshPipelinePassEnabled(string pass, bool enabled) -> bool
meshPipelineAspect infallible
infallible fn meshPipelineAspect() -> float
renderPointerCapture infallible
infallible fn renderPointerCapture(bool captured) -> bool
meshPipelineDimensions infallible
infallible fn meshPipelineDimensions(array<float> dimensions) -> bool
noiseSimplex2Grid infallible
infallible fn noiseSimplex2Grid(
int width,
int depth,
int seed,
float frequency,
int octaves,
array<float> output) -> bool
meshPipelineInspectJson infallible
infallible fn meshPipelineInspectJson(string source, string root) -> string
meshPipelineInspect infallible
infallible fn meshPipelineInspect(int id) -> string
meshPipelineInspectInstalled infallible
infallible fn meshPipelineInspectInstalled() -> string
meshPipelineReload infallible
infallible fn meshPipelineReload(string asset) -> task<bool>
meshPipelineFloat infallible
infallible fn meshPipelineFloat() -> int
meshPipelineFloat2 infallible
infallible fn meshPipelineFloat2() -> int
meshPipelineFloat3 infallible
infallible fn meshPipelineFloat3() -> int
meshPipelineFloat4 infallible
infallible fn meshPipelineFloat4() -> int
meshPipelineRgba16f infallible
infallible fn meshPipelineRgba16f() -> int
meshPipelineR32f infallible
infallible fn meshPipelineR32f() -> int
meshPipelineLinear infallible
infallible fn meshPipelineLinear() -> int
meshPipelineNearest infallible
infallible fn meshPipelineNearest() -> int
meshPipelineClamp infallible
infallible fn meshPipelineClamp() -> int
meshPipelineRepeat infallible
infallible fn meshPipelineRepeat() -> int
renderVertexFloat infallible
infallible fn renderVertexFloat() -> int
renderVertexFloat2 infallible
infallible fn renderVertexFloat2() -> int
renderVertexFloat3 infallible
infallible fn renderVertexFloat3() -> int
renderVertexFloat4 infallible
infallible fn renderVertexFloat4() -> int
renderVertexInt infallible
infallible fn renderVertexInt() -> int
renderVertexInt2 infallible
infallible fn renderVertexInt2() -> int
renderVertexUint infallible
infallible fn renderVertexUint() -> int
renderVertexUint2 infallible
infallible fn renderVertexUint2() -> int
renderVertexUbyte4Normalized infallible
infallible fn renderVertexUbyte4Normalized() -> int
renderVertexUshort2 infallible
infallible fn renderVertexUshort2() -> int
renderVertexHalf2 infallible
infallible fn renderVertexHalf2() -> int
renderVertexUbyte4 infallible
infallible fn renderVertexUbyte4() -> int
renderVertexUshort4 infallible
infallible fn renderVertexUshort4() -> int
meshPipelineCreate
fn meshPipelineCreate() -> MeshPipeline
meshPipelineInstalled
fn meshPipelineInstalled() -> MeshPipeline