i need help for a project
i need a c++ source code that will do what this would in basic
for a = 1 to 50
color a
for b = 1 to 360
for c = 1 to 200
pset(a,c)
next c
next b
next a
i pretty much wanna have the screen printed pixel by pixel until an entire screen is filled and do this 50 times and then time it in basic and in c++ using direct x and seeing which one runs faster since basic is less code but direct x is more advanced.
if anyone can figure out source code for this and send me it at gaurdianofhell01@aol.com or reply with it it would be much apreciated. thanks for your help.
Firstly, directx is faster. Secondly, if you don''t know any C yourself, then you need to learn about C before you learn about directx.
''Nuff said. I''ll enjoy watching you live, demon.
''Nuff said. I''ll enjoy watching you live, demon.
Well, if you''re using QBasic in Dos, you should compare it to C/C++ in dos (like borland turbo c/c++). Also, if you''re outputting directly to the Screen Buffer in QBasic, and DX is using an offscreen buffer... there will be a HUGE difference just because of the memory addresses it''s writing too.
Billy
BillyB@mrsnj.com
Billy
BillyB@mrsnj.com
Oh, and Mayrel... DirectX isn''t necessarily faster just because it''s DirectX. DirectX really isn''t that fast (and can''t write to the exact same memory address any faster than anything else can). A compiled C/C++ program will be faster than an Interpretted QBasic program, but a compiled QBasic program will run *about* the same speed a c/c++ program (depending on how advanced the compilers are).
Billy
Billy
i do know c++ but i just dont know about direct x and i want to learn it and im planning on learning it but i want to know if this can be done and how because i need the project hypothesis and procedure by next week. it doesnt matter if u can tell me which goes faster i just wanna know the sourse code so i can do this project and my cisco and c++ teachers said i could get help on here so here i am
Ha! I did this exact thing back in Ninth Grade (that was in 1991) for a science project, except I took it to the extreme (not only graphics, but also data processing, text printing, etc.), I used Turbo Basic, and I used Turbo C. Both used compiled code, but, as expected, C was much faster. I don''t feel like explaining why, but just sparking some nostaliga for me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement