Advertisement Jump to content
Sign in to follow this  
metecan

2 newbie questions about directdraw(c & dll)

This topic is 4914 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, i am new to the environment and i have 2 basic questions 1) isn't it possible to use directdraw from a C program? I have a basic dd application which draws some bmp's to the screen, i can compile it with ".cpp" extension but i cant compile with the extension ".c". As far as i can see i am not using any cpp structures , classes or something like that. With .c extension the compiler identifies dd objects such as IDirectDrawSurface7 but it cannot find some of its methods such as Release(). *using vc++ 6 2) I needed to rearrange the code as a dll.I moved the init,deinit and drawing sections to the dll. It gives about 2 fps.(It was 75 without the dll). I did lots of changes but i got stuck with 2 fps. Am i missing something here or is this normal? thanks in advance Mete

Share this post


Link to post
Share on other sites
Advertisement
C++ is, in reality an extension of C. The extension of the file (".cpp"), makes no to your C code, and is probably left there. DirectDraw uses OOP, so that might be why your extension is causing it grief, but once again, best leave it as .cpp.

As for the second question, you should be geting faster results than that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!