Jump to content
  • Advertisement


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


help me with some source code

This topic is 5968 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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!