Archived

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

general WinMain + D3D

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

Id it possible to create a Direct3D app without having the windows messaging? I have to register my wndclass and call CreateWindow to create window. Then Create D3D + D3DDevice. Normalli I have while() - loop in my WinMain() and there I do something like TranslateMessage(...) and dispatchMessage(...). But is it ok just to forget windows message handling. Or to create D3Dapp without creating first a window (int fullscreen)? Is it correct to do the message handling once in frame or should I primarily handle all the windows messages and then continue to frame and do nice 3d stuff? There are lot of questins of basic windows programming. I know there are some recommedation for windows programs, ie app shoul be able to close clicking the X in top-right. But as a game programmer, can I forget this? I''m very thankful for any ideas of the basic structure of windows game. I''m making game engine, trying to make the API as simple as possible. So I don''t want any extra Windows message handling to the user side.

Share this post


Link to post
Share on other sites
Yes, you need to create a window and handle messages. What I did in my engine is have a function called riUpdate, which handles physics updates, windows message, et cetera. The user knows if the application should close depending on the return value.

Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/ (If my website isn''t down, it''s a miracle!)

Share this post


Link to post
Share on other sites