Page 1 of 1
Graphic Card
Posted: Fri Dec 24, 2021 1:47 am
by elektrikboy
hi guys
noob question again lol
I have a ASUS with i7 and a dedicated nvidia geforce gt 650M (2Gb dedicated) laptop...how can I make Irrlicht use this nvidia instead of Intel integrated video card??
Re: Graphic Card
Posted: Fri Dec 24, 2021 11:19 am
by CuteAlien
I have no system here to test (my cpu graphicard is made inaccessible by the board...), but for Windows there is this trick. Add this code in your application:
Code: Select all
#if defined(_WIN32)
// Tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
// Trick found here: https://gist.github.com/statico/6809850727c708f08458
// NOTE: Those lines cause our project to create .exp and .lib files additional to .exe files.
extern "C"
{
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
For D3D9 we've also added DisplayAdapter parameter in SIrrCreationParameters (which you can pass when creating a new device) in the svn trunk version of Irrlicht.
For Linux - I simply don't know yet, sorry.
Re: Graphic Card
Posted: Fri Dec 24, 2021 12:00 pm
by elektrikboy
Thx again man!!
It's working perfectly now!