🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Just a newbie looking for help

Started by
0 comments, last by (K~os) 24 years, 4 months ago
Hello, I''ve been a programmer for quite some time, using such DOS libraries as Allegro. I''ve recently decided to switch to DirectX, and I''ve been having trouble. You see, the way I''ve always learned to use a set of libraries is to build some very simple little programs. From what I''ve gathered, DirectDraw is simply used for a place in memory to put the images your program uses. I have no problem with that, I can see its uses, but I''m used to functions that will actually draw things. I don''t want to deal with loading everything I''m going to use from a file. For example, I usually start using a library by drawing a circle on the screen, and moving it around as I like. I''m pretty sure that what DirectDraw will let me do is draw a circle onto one of its surfaces, and then it will let me blit that to the screen. My question is, which library should I use? I just need something that can draw, is that so much to ask? To anyone who replies, thank you, it is appreciated, and I''m sorry to have wasted your time.
- (K~os)
Advertisement
well, the easiest (and slowest) way:

first, do all of your initialization code -- you can find a tutorial that sets up a program

then, call the method on the back buffer called GetDC, and pass it by reference an HDC
then call a drawing function from the windows api to draw
then call ReleaseDC, passing it your hdc again, when you are finish, and flip

example:
HDC hdc;
BackSurface->GetDC(&hdc);
LineTo(hdc,100,100);
BackSurface->ReleaseDC(hdc);

or something like that
-PoesRaven

This topic is closed to new replies.

Advertisement