Dimenticare

3d card

Dec 5th, 2018
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. vertex_format_begin();
  2. vertex_format_add_position_3d();
  3. vertex_format_add_texcoord();
  4. vertex_format_add_colour();
  5. format=vertex_format_end();
  6.  
  7. card=vertex_create_buffer();
  8. vertex_begin(card, format);
  9. var w=8;
  10. var h=16;
  11. /*
  12.  * for each point add in texture coordinates and color (probably c_white),
  13.  * i just removed those so that this didn't become a million lines long
  14.  */
  15. vertex_position_3d(card, w, 0, h);
  16. vertex_position_3d(card, w, 0, 0);
  17. vertex_position_3d(card, -w, 0, 0);
  18.  
  19. vertex_position_3d(card, -w, 0, 0);
  20. vertex_position_3d(card, -w, 0, h);
  21. vertex_position_3d(card, w, 0, h);
  22.  
  23. vertex_position_3d(card, -w, 0, 0);
  24. vertex_position_3d(card, w, 0, 0);
  25. vertex_position_3d(card, w, 0, h);
  26.  
  27. vertex_position_3d(card, w, 0, h);
  28. vertex_position_3d(card, -w, 0, h);
  29. vertex_position_3d(card, -w, 0, 0);
  30. vertex_end(card);
  31. vertex_freeze(card);
Advertisement
Add Comment
Please, Sign In to add comment