Jump to content
  • Advertisement


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


PR Windowed mode, help needed

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

Hi !!

Well, you made it to port PR to MFC ?? Ok, the reason might be something with MFC. Check out winutil.c !! There you will find a few Error messages, but PR uses the same for both keyboard and mouse. Perhaps you should change the text to find out if it's the mouse, keyboard or DirectDraw/Direct3D(This is done internally in Power Render) which makes the problems.
Did you remove the
in winutil ???
Did you ever get an example running in Windowed-Mode.

I am running my Volumetric Fog example in windowed mode, so it works fine for me.


Share this post

Link to post
Share on other sites
I believe it's the DirectDraw/Direct3D SetCooperativeLevel function, which is called internally during PR_Initialize. I didn't find the error string in a search of all PR files, and I'm so far unsure as to how I could have caused it.

I will take your advice and first work with sample apps in their own window. Hopefully that will turn something up.


Share this post

Link to post
Share on other sites

I am not using MFC, but I had a situation one time where the window referenced by hWndMain do not have the focus when PR/DX/D3D was init... so it would cause the coop level to fail... may wanna double check that this is not the case.

Jarrod Davis

[This message has been edited by JDS Games (edited August 19, 1999).]

Share this post

Link to post
Share on other sites
Thanks for the tips. Both have helped me figure out what's going on; it was a combination of a few things now resolved. I may have some other questions in a bit though.

Share this post

Link to post
Share on other sites
Here's what's going on: I have a quadframe window with four views: 3D, XY, XZ, ZY. The app is written using MFC. I ported over the sample code for winutil.c and devdlg.c, making sure to set ghInstance and hWndMain appropriately. I then do this:

PR_Settings.UseWindowed = 1;

It brings up the device dialog, but no matter what I choose; when I click okay it shows an error message:

SetCooperativeLevel failed

It sounds like a DD issue, but I've seen PR in windowed mode, so what am I doing wrong?

If you need anymore information, please email me.

Here are HTML source listings you might need to look at:
prglobal.c html format
led3DView.cpp html format

Thanks everyone!


[This message has been edited by DarrenNix (edited August 19, 1999).]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!