Archived

This topic is now archived and is closed to further replies.

help me with some source code

This topic is 5747 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi all, i am new with DX, i heard all of you talking about it a lot,but i have something want to ask you about DX,can you tell me ? .DX,is it the best way to make game? .a few years ago,i began with dos program(pascal,mode 13h),i think it too slow,using DX,can i draw the bufferscreen faster .anyone can show me some source code using DX to draw the pixels on the screen like this: do {for x=0 to width { for y=0 to height { putpixel(x,y,random(and randomrange)) } } loop(key_hit=escape) thankx alot

Share this post


Link to post
Share on other sites
Well I''m using DDraw6 and there is no functions for primitives(might be different with DX8). I found this kind of confusing but you draw pixels directly to memory like this. UCHAR buffer;
buffer[x+y*lPitch] = color; The buffer is the array of your screen. Say 640x480x8; You need a book or a good tutorial to explain it.

DDraw. She has double D''''s

Share this post


Link to post
Share on other sites