1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
int main()
{
HDC HDCConsole = GetConsoleHDC();
RECT rec;
GetClientRect(GetConsoleWindow(),&rec);
int Speed=1;
LineSteps line(20,100,100,700,400,700);
image test(1000,600);
int FramePerSecond=0;
int Frames=0;
RECT rec2 ={0,30,170,50};
auto Start =GetTickCount();
do
{
test.Clear();
string s="Frame Per Second: " + to_string(FramePerSecond);
DrawText(test,s.c_str(),-1, &rec2, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
int TextureY=0;
for(int i=0; i<600; i++)
{
test.DrawLine(line.OriginX, line.OriginY+i, line.OriginZ, line.DestinationX, line.DestinationY+i, line.DestinationZ,RGB(0,255,0), false);
}
BitBlt(HDCConsole,50,0,test.Width, test.Height,test,0,0,SRCCOPY);
/////////////**************
| |