MFC and full screen D3D

Started by
1 comment, last by FrigidHelix 22 years, 9 months ago
I have limited experience with MFC, and I was wandering as to the feasiblity of using MFC in a full screen D3D game. Is it possible? I know there will be some penalty in terms of performance, but the scenes I plan to redner aren''t too complex anyway. The reason I would like to use MFC is that I plan on having a lot of user interaction, and I don''t want to write my own GUI. Does anyone know how I would set up my project? The windows GDI would need access to the display as well as D3D (not simultaneoulsy tho).
Advertisement
Yes, depending on your degree of MFC/D3D interaction.

Generally, switching between GDI and DX is VERY expensive, so I wouldn''t do something like D3D models with GDI lines or text. You could, but it''s not good.

Doing something like placing a DX window in a dialog box that has buttons, etc. around the DX window is very doable, but I wouldn''t mix the actual drawing. If you want a DX scene with something like a listbox in the DX window, it''s probably best to implement a list box in DX.

One crazy idea... can you inherit off of the list box and override the drawing functions with DX drawing calls? It might not make any sense, but the listbox already knows the data structures, etc. Again, it may be alot more trouble than it''s worth...
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
Well, if you go full screen there''s not a lot of MFC functionality to use. I guess you don''t have to bother writing a message pump, and the messages are cracked for you; but there’s only a couple of message you need to deal with.

You could still use the CFile/CSocket capabilities, but those are the one I''m staying away from. I want the engine to be more flexible – the client can use all the MFC it wants. If the engine uses MFC, then the client must use MFC, which is undesirable.

I intermix GDI drawing with the rendering. Part of our graphics engine lets you retrieve a handle to a DC that I use to blit text to, for things like displaying the frame rate. It takes 267us to GDI draw the text for the frame rate, which is a really long time for just a couple of characters. But you certainly can use it if you don’t have a lot of text to draw, or until you write your own text blitter.

quote:
One crazy idea... can you inherit off of the list box and override the drawing functions with DX drawing calls? It might not make any sense, but the listbox already knows the data structures, etc. Again, it may be alot more trouble than it''s worth...

I was thinging about that, but I''m not sure how feasible it is. I don''t think MFC does the painting; it''s delegated back to the built-in support of Win32 for controls.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement