Archived

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

DarrenNix

PR Windowed mode, help needed

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
#define USE_FULLSCREEN
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.

Phillip

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.

DarrenNix@msn.com

Share this post


Link to post
Share on other sites
Hi,

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
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;
PR_Initialize(1000);

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

init
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!

darrennix@msn.com

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

Share this post


Link to post
Share on other sites