C
ChaosTheory
Guest
I am trying to set up a triangle strip with a custom vertex format in GMS 2.0. I only want position and texture coordinates. It seemed simple enough, but I keep getting:
This is not rocket science, but I don't understand what the problem is. I have boiled it down to be as simple as I can, but I get the same message every time.
I have a dirt-simple custom format:
Some code that inserts a triangle strip into a vertex buffer:
A dirt-stupid Draw event:
And a dirt-stupid vertex shader:
I'm kind of out of ideas here. Any help will be appreciated.
Could not generate input layout (is there a mismatch between your shader and vertex format?)
Draw failed due to invalid input layout <repeat>
This is not rocket science, but I don't understand what the problem is. I have boiled it down to be as simple as I can, but I get the same message every time.
I have a dirt-simple custom format:
Code:
vertex_format_begin();
vertex_format_add_position_3d();
vertexFormat = vertex_format_end();
Some code that inserts a triangle strip into a vertex buffer:
Code:
vertex_position_3d(vertexBuffer, pX, pY, 0.0); // in a loop that controls pX and pY, of course.
A dirt-stupid Draw event:
Code:
shader_set(shader);
vertex_submit(vertexBuffer, pr_trianglestrip, dummyTexture); // 'cause we don't need no stinkin' texture.
shader_reset();
And a dirt-stupid vertex shader:
Code:
attribute vec3 inPosition; // (x,y, z)
varying vec3 v_vPosition;
void main()
{
vec4 object_space_pos = vec4( inPosition.x, inPosition.y, inPosition.z, 1.0);
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
v_vPosition = inPosition;
}
I'm kind of out of ideas here. Any help will be appreciated.