C
cambalinho
Guest
the Light, the Models, the Drawing and Transformations have, too, Vertex. but how use them?
i never use them, i don't know what them.
i never use them, i don't know what them.
d3d_primitive_begin(pr_pointlist);
d3d_vertex_colour(x,y,z,c_yellow,1);
d3d_vertex_colour(x,y,z+p,c_yellow,1);
d3d_vertex_colour(x,y+h,z+p,c_yellow,1);
d3d_vertex_colour(x,y+h,z,c_yellow,1);
d3d_vertex_colour(x,y,z,c_yellow,1);
d3d_primitive_end();
d3d_primitive_begin(pr_linelist);
//vertical left line:
d3d_vertex_colour(x,y,z,c_yellow,1); //start line
d3d_vertex_colour(x,y,z+p,c_yellow,1);//end line
//horizontal up line:
d3d_vertex_colour(x,y,z+p,c_yellow,1);
d3d_vertex_colour(x,y+h,z+p,c_yellow,1);
//vertical right line:
d3d_vertex_colour(x,y+h,z+p,c_yellow,1);
d3d_vertex_colour(x,y+h,z,c_yellow,1);
//horizontal bottom line:
d3d_vertex_colour(x,y+h,z,c_yellow,1);
d3d_vertex_colour(x,y,z,c_yellow,1);
d3d_primitive_end();
d3d_primitive_begin(pr_pointlist);
d3d_vertex_colour(x,y,z,c_yellow,1);
d3d_vertex_colour(x,y,z+p,c_yellow,1);
//d3d_vertex_colour(x,y,z+p,c_yellow,1);
d3d_vertex_colour(x,y+h,z+p,c_yellow,1);
//d3d_vertex_colour(x,y+h,z+p,c_yellow,1);
d3d_vertex_colour(x,y+h,z,c_yellow,1);
//d3d_vertex_colour(x,y+h,z,c_yellow,1);
d3d_vertex_colour(x,y,z,c_yellow,1);
//like you see i just commented the double line code
d3d_primitive_end();
I hate to sound like a jerk repeating myself, but you should once again look up the pr_* constants in the manual. That's expected behaviour for the type of primitive you're creatingi have notice that for all vertices, we must create 2 Vertex:
They didn't give up on 3D. They just changed the way it's done (no more d3d, but now there are vertex buffers and stuff). No idea why they changed it, but I'm guessing the new way is more efficient or more powerful or something.i'm using GMS1.
to be honesty, i will never understand why they 'give up' on 3D
My insistence on using the manual wasn't to push you away, it was because the page on primitives gives an actual picture on what each primitive type does, making it easier to figure out which one you needed to use both now and in the future.hey. i have notice that you are realy help me. but don't felt on that way by 2 reasons:
1 - i'm Portuguese, but i'm learning English by experience;
2 - i never worked with Vertex.
the Game Maker Studio tutorial is more technic than explicit
thanks for all to all.
thank you so much
text=background_get_texture(bkgAbove);
d3d_primitive_begin_texture(pr_trianglefan,text);
d3d_vertex_texture(x, y+h, z, 0, 0);
d3d_vertex_texture(x+w, y+h, z, 1, 0);
d3d_vertex_texture(x+w, y+h, z+p, 1, 1);
d3d_vertex_texture(x, y+h, z+p, 0, 1);
d3d_primitive_end();
draw_set_colour(c_white);
text=background_get_texture(bkgAbove);
d3d_primitive_begin_texture(pr_trianglefan,text);
d3d_vertex_normal_texture(x, y+h, z,0.5, 0.5, -0.5, 0, 0);
d3d_vertex_normal_texture(x+w, y+h, z,0.5, 0.5, -0.5, 1, 0);
d3d_vertex_normal_texture(x+w, y+h, z+p,0.5, 0.5, -0.5, 1, 1);
d3d_vertex_normal_texture(x, y+h, z+p,0, 0.5, -0.5, 0, 1);
d3d_primitive_end();
d3d_primitive_begin_texture(pr_trianglefan,text);
d3d_vertex_normal_texture(x+w, y-2+h, z,0.5, 0.5, -0.5, 0, 0);
d3d_vertex_normal_texture(x, y-2+h, z,0.5, 0.5, -0.5, 1, 0);
d3d_vertex_normal_texture(x, y-2+h, z+p,0.5, 0.5, -0.5, 1, 1);
d3d_vertex_normal_texture(x+w, y-2+h, z+p,0, 0.5, -0.5, 0, 1);
d3d_primitive_end();