G
GLTH
Guest
Hello. After several private projects, I thought it would be a good time to start tinkering in third dimension. For my first project, I'm trying to render a simple hexagonal block (6 sides + top + bottom), but after I try to test it, the compiler welcomes me with a message:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object Block:
VERTEX BUILDER: element already written, must write the whole vertex first
at gml_Object_Block_Create_0 (line 39) - vertex_position_3d(v_buff_top, v_x[5], v_y[5], z + height);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_Block_Create_0 (line 39)
I honestly have no idea what's wrong, especially that it crashes in create event during defining vertices. Here's create code:
vertex_format_begin();
vertex_format_add_position_3d();
vertex_format_add_texcoord();
vertex_format_add_normal();
vertex_format_add_color();
v_format = vertex_format_end();
//top
v_buff_top = vertex_create_buffer();
vertex_begin(v_buff_top, v_format);
vertex_position_3d(v_buff_top, x, y, z + height);
vertex_position_3d(v_buff_top, v_x[5], v_y[5], z + height); < this line gives error?
vertex_position_3d(v_buff_top, v_x[0], v_y[0], z + height);
vertex_position_3d(v_buff_top, v_x[1], v_y[1], z + height);
vertex_position_3d(v_buff_top, v_x[2], v_y[2], z + height);
vertex_position_3d(v_buff_top, v_x[3], v_y[3], z + height);
vertex_position_3d(v_buff_top, v_x[4], v_y[4], z + height);
vertex_position_3d(v_buff_top, v_x[5], v_y[5], z + height);
vertex_end(v_buff_top);
v_buff_e = vertex_create_buffer();
(repeat for every side and bottom)
Is this because I'm on trial? Wanted to start tinkering in 3D in GMS2 because of reworked functions and it being faster according to people, but can't buy it at the moment. Then again, it would crash in one of earlier functions, right? I'm at a loss.
Thank you in advance.
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object Block:
VERTEX BUILDER: element already written, must write the whole vertex first
at gml_Object_Block_Create_0 (line 39) - vertex_position_3d(v_buff_top, v_x[5], v_y[5], z + height);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_Block_Create_0 (line 39)
I honestly have no idea what's wrong, especially that it crashes in create event during defining vertices. Here's create code:
vertex_format_begin();
vertex_format_add_position_3d();
vertex_format_add_texcoord();
vertex_format_add_normal();
vertex_format_add_color();
v_format = vertex_format_end();
//top
v_buff_top = vertex_create_buffer();
vertex_begin(v_buff_top, v_format);
vertex_position_3d(v_buff_top, x, y, z + height);
vertex_position_3d(v_buff_top, v_x[5], v_y[5], z + height); < this line gives error?
vertex_position_3d(v_buff_top, v_x[0], v_y[0], z + height);
vertex_position_3d(v_buff_top, v_x[1], v_y[1], z + height);
vertex_position_3d(v_buff_top, v_x[2], v_y[2], z + height);
vertex_position_3d(v_buff_top, v_x[3], v_y[3], z + height);
vertex_position_3d(v_buff_top, v_x[4], v_y[4], z + height);
vertex_position_3d(v_buff_top, v_x[5], v_y[5], z + height);
vertex_end(v_buff_top);
v_buff_e = vertex_create_buffer();
(repeat for every side and bottom)
Is this because I'm on trial? Wanted to start tinkering in 3D in GMS2 because of reworked functions and it being faster according to people, but can't buy it at the moment. Then again, it would crash in one of earlier functions, right? I'm at a loss.
Thank you in advance.