I have created a basic cube model in Blender and exported the Collada dae file and imported that into my project. I have setup the box material similarly to the MeshTest example project posted here: Mesh Component
I configured my model as such:
However when I add the model to a collection in my game I see the error:
WARNING:GRAPHICS: 0(31) : error C1068: too much data in type constructor
I’m not sure what this means or how to fix it. Anyone seen this before?
Hmm I think I figured that out. I was trying to create a vec4 using 4 arguments instead of 2 but now I see:
dmGraphics::OpenGLSetConstantV4(1750): gl error 1282: invalid operation
Looking at the defold source code it is happening in the OpenGLSetDepthStencilRenderBuffer function. However, I have render.disable_state(render.STATE_STENCIL_TEST) set previously when rendering my sprites in the render code.
EDIT: I am able to render an object w/ just the mesh file in the game without issue. However, because it’s not a model I am unable to scale it using the vector shader. Is there some reason I must use a Collada mesh instead of just supplying the mesh created in Defold? Also, how am I meant to create a buffer? I can look at an example of a box and the name/type/count fields make sense. However, after there’s simply a large number of “data” float values. Maybe I’m misusing the buffer and treating it like a model. Is this more of a bounding box for where vertices in the Collada dae file can exist within?
EDIT2: I now have a mesh rendering properly in the game! I am not using the Model object instead just creating a mesh and transforming the buffer positions in the script. I have a few questions however if anyone has the time/knowledge: I would like to toggle visibility of an entire mesh object dependent on the player position. Also, I would like to learn how to create a buffer file. In the example the monkey head for instance is represented by the data in the suzanne.buffer file. However, I don’t see any tools for creating this type of file or how to interpret it. If anyone knows of some resources please guide me towards them
Thanks if anyone has the time to read this. Hoping to get some 3D objects into my game soon!