-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I've solved this by using the underlying int64 type. // Internal type is int64
type MeshPrimitiveType int64 // Just use an int64
// From https://docs.godotengine.org/en/4.0/classes/class_mesh.html#enum-mesh-primitivetype
const PRIMITIVE_TRIANGLES = 3
s.SurfaceTool.Begin(PRIMITIVE_TRIANGLES) |
Beta Was this translation helpful? Give feedback.
-
@nii236 I really appreciate all of the dicussions you've started and issues you have finding. It really helps the project! In this case, the Mesh classdb package aliases this type: type PrimitiveType = gdclass.MeshPrimitiveType //gd:Mesh.PrimitiveType
const (
/*Render array as points (one vertex equals one point).*/
PrimitivePoints PrimitiveType = 0
/*Render array as lines (every two vertices a line is created).*/
PrimitiveLines PrimitiveType = 1
/*Render array as line strip.*/
PrimitiveLineStrip PrimitiveType = 2
/*Render array as triangles (every three vertices a triangle is created).*/
PrimitiveTriangles PrimitiveType = 3
/*Render array as triangle strips.*/
PrimitiveTriangleStrip PrimitiveType = 4
) You can use these constants directly without creating your own constant declarations. s.SurfaceTool.Begin(Mesh.PrimitiveTriangles) I am aware this isn't particularly easy to find and the godot documentation imported as-is references the enum values in all-upper-case. The use of the internal |
Beta Was this translation helpful? Give feedback.
@nii236 I really appreciate all of the dicussions you've started and issues you have finding. It really helps the project!
In this case, the Mesh classdb package aliases this type: