Is it possible to force maximum use of the video card with ogre3d?

Everything related to 3D programming
miso
Enthusiast
Enthusiast
Posts: 631
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: Is it possible to force maximum use of the video card with ogre3d?

Post by miso »

Please, test it for differences. I dont have such laptop. You had good results with the compiled exe after forcing nvidia to use dgpu with it?
User avatar
skinkairewalker
Addict
Addict
Posts: 824
Joined: Fri Dec 04, 2015 9:26 pm

Re: Is it possible to force maximum use of the video card with ogre3d?

Post by skinkairewalker »

Is it possible to do this in PureBasic, according to the documentation?

Nvidia (https://developer.download.nvidia.com/d ... licies.pdf)

Code: Select all

extern "C" {
 _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}
AMD

Code: Select all

extern "C"
{
  __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}

something like this ??

Code: Select all

Global NvOptimusEnablement.l = 1
Global AmdPowerXpressRequestHighPerformance.l = 1

If InitEngine3D()
  OpenWindow(0, 0, 0, 800, 600, "GPU Test", #PB_Window_SystemMenu)
  OpenWindowedScreen(WindowID(0), 0, 0, 800, 600, 0, 0, 0)

  CreateCube(0, 1)
  CreateEntity(0, MeshID(0), #PB_Material_None)

  Repeat
    RenderWorld()
    FlipBuffers()
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Post Reply