dev_qpu.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. int machine_video_flip() {
  3. nv_vertex_t* triangles = r3d_init_frame();
  4. Cell* c_x1 = lookup_global_symbol("tx1");
  5. Cell* c_x2 = lookup_global_symbol("tx2");
  6. Cell* c_y1 = lookup_global_symbol("ty1");
  7. Cell* c_y2 = lookup_global_symbol("ty2");
  8. int x1 = c_x1->value*16;
  9. int y1 = c_y1->value*16;
  10. int x2 = c_x2->value*16;
  11. int y2 = c_y2->value*16;
  12. triangles[0].x = x1;
  13. triangles[0].y = y1;
  14. triangles[0].z = 1.0f;
  15. triangles[0].w = 1.0f;
  16. triangles[0].r = 1.0f;
  17. triangles[0].g = 0.0f;
  18. triangles[0].b = 1.0f;
  19. triangles[1].x = x2;
  20. triangles[1].y = y1;
  21. triangles[1].z = 1.0f;
  22. triangles[1].w = 1.0f;
  23. triangles[1].r = 1.0f;
  24. triangles[1].g = 1.0f;
  25. triangles[1].b = 1.0f;
  26. triangles[2].x = x1;
  27. triangles[2].y = y2;
  28. triangles[2].z = 1.0f;
  29. triangles[2].w = 1.0f;
  30. triangles[2].r = 1.0f;
  31. triangles[2].g = 1.0f;
  32. triangles[2].b = 1.0f;
  33. triangles[3].x = x2;
  34. triangles[3].y = y1;
  35. triangles[3].z = 1.0f;
  36. triangles[3].w = 1.0f;
  37. triangles[3].r = 1.0f;
  38. triangles[3].g = 1.0f;
  39. triangles[3].b = 1.0f;
  40. triangles[4].x = x2;
  41. triangles[4].y = y2;
  42. triangles[4].z = 1.0f;
  43. triangles[4].w = 1.0f;
  44. triangles[4].r = 1.0f;
  45. triangles[4].g = 0.0f;
  46. triangles[4].b = 1.0f;
  47. triangles[5].x = x1;
  48. triangles[5].y = y2;
  49. triangles[5].z = 1.0f;
  50. triangles[5].w = 1.0f;
  51. triangles[5].r = 1.0f;
  52. triangles[5].g = 1.0f;
  53. triangles[5].b = 1.0f;
  54. r3d_triangles(2, triangles);
  55. r3d_render_frame(0xffffffff);
  56. //memset(FB_MEM, 0xffffff, 1920*1080*4);
  57. //r3d_debug_gpu();
  58. return 0;
  59. }
  60. */