BrutPitt / glChAoS.P

3D GPUs Strange Attractors and Hypercomplex Fractals explorer - up to 256 Million particles in RealTime
https://michelemorrone.eu/glchaosp
BSD 2-Clause "Simplified" License
786 stars 61 forks source link

Able to choose dedicated GPU if present? Possible solution inc. #10

Open GrainaSand opened 1 year ago

GrainaSand commented 1 year ago

https://stackoverflow.com/questions/68469954/how-to-choose-specific-gpu-when-create-opengl-context

"Win32 GDI integration of OpenGL doesn't offer means to explicitly select the desired device"

Maybe add #defines to glApp.h, worked for me to pre-select Nvidia RTX3070Ti over Iris Xe

define _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;

#define _declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 0x00000001;

When the Nvidia and AMD drivers see their respective symbol exported and set to nonzero in a program, they will take precedence over the integrated GPU when creating the OpenGL context