DX 8 in MFC SDI apps
i''m trying to make a dx8 app run in a MFC SDI environment and i don''t quite know where to begin. i read the dx8 in mfc tutorial in the articles section but that wasn''t much help (backbuffer dimensions, i am supposedly drawing into a view, but where was i suppose to specify that? etc.)
initially i thought this was easy, i just get the client area, make that the back buffer, and draw... but that didn''t work (the DX drew over my toolbar which was apparently in the client area, and the white client area remained blank along with other bizarre effects).
ive done a lot of stuff with dx and opengl in full screen environments but for my current application i think the easy mfc-made gui would be really useful so if anybody can give me the low-down or even better, a sample project of dx8 in sdi, that wud b highly appreciated. thx
quote:Original post by wannabe H4x0r
initially i thought this was easy, i just get the client area, make that the back buffer, and draw... but that didn't work (the DX drew over my toolbar which was apparently in the client area, and the white client area remained blank along with other bizarre effects).
You need to use the view window, not the frame window, for rendering. See there. Note: the article doesn't present the optimal way of combining DX & MFC (in particular, you should call UpdateFrame from CMyApp::OnIdle handler instead of invalidating view's client area), but it should get you started.
[edited by - IndirectX on June 23, 2002 10:15:22 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement