i'm having hard time figuring out how draw circle in directx. i'm able draw triangle, imagined might able draw 1 rotating triangle in circle. however, i'm absolutely stumped. i've been scouring net hours no luck. can me out? here's code: main.cpp #include "engine.h" #include "box2d.h" #include "triangle2d.h" class myapp : public engine { public: box2d box2d; triangle2d triangle2d; void onstartup() override { box2d.new(10.0f, 10.0f, 100.0f, 100.0f, d3dcolor_argb(0xff, 0x00, 0x00, 0xff)); triangle2d.new(150.0f, 10.0f, 100.0f, 100.0f, d3dcolor_argb(0xff, 0xff, 0x00, 0x00)); } void onshutdown() override { box2d.delete(); triangle2d.delete(); } void ondraw() override { box2d.draw(); triangle2d.draw(); } void onmousedown(int x, int y) { debug("%d %d\n", x, y); } }; int winapi winmain(hinstance hinstance, hinstance hprevin...
Comments
Post a Comment