Sign in to follow this  
ro4tub

How to make a 2d game map editor?

Recommended Posts

ro4tub    122
i use MFC and DX9 to implement it. i split the main window,the left view to choose the pic and display it's preview. the right view to display the map. and i want to ask whether i have to init the library twice ,because in the left view i will render the pic for preview and in the right view i will render the pic too.

Share this post


Link to post
Share on other sites
jpetrie    13159
No, you should be fine, if I understand you correctly. Attempting to init DX9 twice (via multiple calls to Direct3DCreate9 will probably get you the same COM pointer, underneath (don't quote me on that though, I don't have the documentation handy or the means to test it right now).

What you'll want to look into is multiple viewports or (even better) multiple swap chains. There's a code sample (not exactly a tutorial, but easy enough to follow) for both here and if you search a bit using those terms, you can probably find others.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this