Sign in to follow this  

Shadow mapping in MFC...

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

Hai... I'm a beginner... Now I was try to make a shadow with shadow mapping algorithm in MFC C++. I confuse.. Is MFC C++ can support shadow mapping??? Because in many project that I see.. I never saw shadow mapping program with MFC C++. Maybe you can help me to create this project...

Share this post


Link to post
Share on other sites
I'm sorry to inform you that MFC has nothing to do with Shadow Mapping. MFC is an API for creating windows and GUI's. You'll need to choose a graphics API (opengl or directx for instance) and implement shadow mapping with one of these.

http://www.codesampler.com
http://nehe.gamedev.net

MFC specific:
http://www.codeproject.com/useritems/mfcd3d.asp
http://www.codeproject.com/opengl/wrl_viewer.asp


Good Luck.

Share this post


Link to post
Share on other sites
OK... I mean is MFC + OpenGL can create a shadow mapping????

Because I was try to created shadow mapping application with MFC+OpenGL+GLee..
But I was failed. I look on www.paulproject.com and i implement it in MFC+OpenGL..

Is somebody can give me some advise... how the best way to make shadow map in MFC+OpenGL??

Thanx...

Share this post


Link to post
Share on other sites
Quote:
Original post by coba2
OK... I mean is MFC + OpenGL can create a shadow mapping????

Yes. It can do everything else OpenGL can do, because MFC and OpenGL are essentially independent (except for the windowing part).

Quote:

Is somebody can give me some advise... how the best way to make shadow map in MFC+OpenGL??

The same way you do it without MFC.

Share this post


Link to post
Share on other sites
OK... so I can using OpenGL+MFC to create a shadow map program...

if I create a shadow map application... Am I need a OpenGL extension??? If yes what is your advice.. I read many option like GLee.. GLSL... or GLext.. I'm confuse to decide it. Thnx for your help...

Share this post


Link to post
Share on other sites
Yes, if you opted to use OpenGL you'll need to initialize at least some OpenGL extensions. The type of extensions you need depend on the type of shadows you want to do (projective shadows, volume shadows, shadow maps...).

Share this post


Link to post
Share on other sites
First of all, there is no such extension that will give you automatic shadow maps via simple enable/disable switch. You'll need access to some OpenGL extension because the unextended OpenGL on pre-Vista OS is good enough only for rotating triangles (understatement but not far from truth). Just use one the free extension loaders (GLee, GLEW, whatever) and pray to the gnomish dark gods that your video card supports what you need.

Secondly, your Google-Fu is weak. The most detailed explanations are given in the books (Cg Tutoral, GPU Gems, Shader X series...) but if you cannot afford them, simple google search will yield enough information that you can spend months reading through it. People already gave you useful links (see honayboyz post above). It doesn't get any easier than that.

Share this post


Link to post
Share on other sites
GLee is just a single header and source code file. The provided lib is compiled on VC7 so you probably shouldn't use it in VC8 projects, but considering its source code is written in cross platform way and MS has one of the most standard compliant C++ compilers out there, you really shouldn't have any problems creating your own static lib.

Plus, you don't have to use static lib at all. Instead of linking with lib file, just include the source code file into your OpenGL project and everything should work out automagically.

http://www.opengl.org/sdk/libs/GLee/

Share this post


Link to post
Share on other sites
I would forget about shadows for a longggg time. Until you have objects moving around on the screen that are actualy suitable for shadowing situations.

Then when you really are ready, I recemend you use GLEW to activate the vertex and fragment program extensions (shaders), as these will allow the most flexibility and easy of instalation of shadows.

Share this post


Link to post
Share on other sites
OK.. thanks for your suggestion for the library. But, i want to ask about all your suggestion library. Is your library can support in MFC program??
Because I'm afraid that after I using it, it cannot support in MFC VC++ 8.

I will try to make shadow mapping using MFC application... Please give a comment..

Share this post


Link to post
Share on other sites
OK.. now I already implement GLee library in my project Shadow Mapping. And it's have been work. But i still confuse about rendering of shadow mapping...

I would ask to all of you.. what method that i using to rendering the object?? Ray tracing?? Or what??? And how i can create the shadow?? Is my library will do it or i must create it by my self???

Thanx

Share this post


Link to post
Share on other sites

This topic is 3850 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.

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