Google

NVPerfHUD - CEGUI

Problems building or running the engine, queries about how to use features etc.

Moderators: Moderators, OGRE Team

NVPerfHUD - CEGUI

Postby Deeroc » Mon Aug 15, 2005 6:00 am

So I've followed the WIKI http://www.ogre3d.org/wiki/index.php/HowTo_%28part_II%29#How_to_enable_NVPerfHUD and when I start my app up with NVPerfHUD 3 it tells me that my application isn't setup for NVPerfHUD and if I'm the developer then I need to enable it??

What gives? :)

Also, it doesn't show NVIDIA NVPerfHUD as a render device. Only the normal Direct3D9 device.
Last edited by Deeroc on Mon Aug 15, 2005 7:09 am, edited 2 times in total.
User avatar
Deeroc
Familiar face
 
Posts: 34
Joined: Sun May 01, 2005 8:32 pm
Location: Ontario, Canada

Postby genva » Mon Aug 15, 2005 6:06 am

Apply this patch:
Code: Select all
Index: RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp
===================================================================
RCS file: /cvsroot/ogre/ogrenew/RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp,v
retrieving revision 1.38.2.3
diff -u -r1.38.2.3 OgreD3D9RenderWindow.cpp
--- RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp   1 Jul 2005 22:04:53 -0000   1.38.2.3
+++ RenderSystems/Direct3D9/src/OgreD3D9RenderWindow.cpp   6 Jul 2005 03:36:27 -0000
@@ -331,6 +331,9 @@
      HRESULT hr;
      LPDIRECT3D9 pD3D = mDriver->getD3D();
      D3DDEVTYPE devType = D3DDEVTYPE_HAL;
+      // Enable NVPerfHUD analysis if request.
+      if (mDriver->DriverDescription() == "NVIDIA NVPerfHUD")
+         devType = D3DDEVTYPE_REF;

      ZeroMemory( &md3dpp, sizeof(D3DPRESENT_PARAMETERS) );
      md3dpp.Windowed               = !mIsFullScreen;

And select NVIDIA NVPerfHUD as D3D Rendering Device.
genva
OGRE Team Member
OGRE Team Member
 
Posts: 1604
Joined: Wed Oct 20, 2004 7:54 am
Location: Beijing, China

Postby Deeroc » Mon Aug 15, 2005 7:11 am

Alright so NVPerfHUD fires up no problem and I can enable it with my hotkey (F12). I guess the problem now lies in that the mouse cursor doesn't work, even when I press F12. The mouse focus stays in my Ogre/CEGUI program and won't let give me control of NVPerfHUD mouse.

Any ideas?
User avatar
Deeroc
Familiar face
 
Posts: 34
Joined: Sun May 01, 2005 8:32 pm
Location: Ontario, Canada

Postby genva » Mon Aug 15, 2005 10:20 am

May be you change hotkey to F11, It's seem F12 cause Windows generate an INT 3 instruction which notify debugger interrupt the application.

[edit]You should configure NVPerfHUD interception DirectInput mouse/keyboard.[/edit]
genva
OGRE Team Member
OGRE Team Member
 
Posts: 1604
Joined: Wed Oct 20, 2004 7:54 am
Location: Beijing, China

Postby Deeroc » Mon Aug 15, 2005 2:13 pm

No go. I changed the hotkey to F11 and I changed it to DirectMouse input, but it still won't switch the mouse to PerfHUD.
User avatar
Deeroc
Familiar face
 
Posts: 34
Joined: Sun May 01, 2005 8:32 pm
Location: Ontario, Canada

Postby tuan kuranes » Mon Aug 15, 2005 2:35 pm

I had once the problem with a debug tool :

you can change the direct input cooperative level of mouse in Ogre platformanager
from
Code: Select all
mlpDIMouse->SetCooperativeLevel(mHWnd,
                   DISCL_FOREGROUND | DISCL_EXCLUSIVE);


to
Code: Select all
mlpDIMouse->SetCooperativeLevel(mHWnd,
                  DISCL_BACKGROUND | DISCL_NONEXCLUSIVE) ;

to ease debuging. (the latter is DX default mode, changed by Ogre.)
it's in ogrewin32input9.cpp

(beware that you can go outside ogre window while it's in foreground and therefore click on the desktop accidentally.)
User avatar
tuan kuranes
OGRE Moderator
OGRE Moderator
 
Posts: 2999
Joined: Wed Sep 24, 2003 8:07 am
Location: Grenoble, France


Return to Help

Who is online

Users browsing this forum: Box5, Google [Bot], lilljohan, Mako_energy, rinesh_t, Yahoo [Bot] and 5 guests