Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by mail-b.sr.ht (Postfix) with ESMTPS id 5695AFF0D6 for <~duangle/scopes@lists.sr.ht>; Mon, 15 Jun 2020 10:44:54 +0000 (UTC) Authentication-Results: mail-b.sr.ht; dkim=pass (2048-bit key) header.d=duangle-com.20150623.gappssmtp.com header.i=@duangle-com.20150623.gappssmtp.com header.b=eCgJtO2L Received: by mail-il1-f182.google.com with SMTP id p5so14797183ile.6 for <~duangle/scopes@lists.sr.ht>; Mon, 15 Jun 2020 03:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duangle-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mQFGodDNHiH3v3QrwqtDSxEQA7oW6INQhtvXij9lwmA=; b=eCgJtO2L8kqcwFOXv5vY3ltkrZcKFKKWpq4bygBtULu1XPW7ztuzAwyBhmNGtUTmXY zAtPWDTSbSAz5Ud/EZAraYGdFBijkYLqs+ws5UPvdQrd3gn2lsRlbP+podI79W4U6Md9 UZEuU5s2hh93U1ukcup2IevszXJRiqvJB6AQzdchwJubD6Q/bL5Qt7Yv5raaFjF3V9cZ cPojZl1QJD4kaJ8pirwoqVAzuMzsQJfCH8fOUniW+wXGj3czaCipAPamLCgwNCoQXURC ZhFrv1e6DbBoKRzJfikKe8h6qyK/sSEyiuAvPIZSwiubnUjSVQzYGnr8IvKt7z0YhMNz puLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mQFGodDNHiH3v3QrwqtDSxEQA7oW6INQhtvXij9lwmA=; b=O9iWQDqpGfc6QdTQ/GAGi9frLAG54r1+F9eUt+wSUQFAXHaqPVaGUuVlgDmiWNd14o z6ofv1UxTnpYtE7HHuNA+mXreZ3UYsHWvdjQp/YISAeoL07f5xhx2mUrZlBm5qbMolwC fxqyIe1G6O8J+Tpmwp9zsosN8Tu9rkBKd+kjm85hmX4ZEl/bTa1MDhGjbIW69mbZB0iG xAAJmZ92kLX4Kq9DnviSfE8TKd3zOCVWw9DcDEv15HhHSdBnrU7Z1nE7tTuT9wGxBLJD UNe1bjRs7I+Q/eQDsuY+e6kTcowo5YiilTaa7r6D4SIYEMiHVgIjV8kflzAZh8dLlPnn kunw== X-Gm-Message-State: AOAM531JVu7zDGZPloERBvPGMB+PykYI+FJ3Fe/8kwQrfOt+NGvNdsc7 ioltmHcdjuOS6Qg2zejBOLF7haaD+ZGww7IfG7y2uFPn X-Google-Smtp-Source: ABdhPJz9Q6Xix8zVSP0fUG7YGFd0LSmseoayX58cC/szs6VxE/rZbQUxMrcZIx0pGi3xQ0aWfdEFvrMdgXooUdAnXKw= X-Received: by 2002:a92:c98a:: with SMTP id y10mr20065443iln.152.1592217893575; Mon, 15 Jun 2020 03:44:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Leonard Ritter Date: Mon, 15 Jun 2020 12:44:42 +0200 Message-ID: Subject: Re: nvidia optimus support in scopes To: Daniel Borges Cc: ~duangle/scopes@lists.sr.ht Content-Type: text/plain; charset="UTF-8" Sounds like a good workaround. Would there anything speak against always linking this symbol into the executable? Leonard On Mon, Jun 15, 2020 at 11:44 AM Daniel Borges wrote: > > Hello, > > I finally found out why Tukan wasn't running on my laptop. Tukan needs > OpenGL 4.5 and my laptop's intel GPU only supports up to 4.2. > Fortunately, my laptop also has an nVidia GPU that supports 4.5. There > are several ways of making programs use it: > http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf > > I ended up adding the following line to scopes' main.cpp. > > extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; > > That probably isn't the best solution though but considering the dynamic > nature of scopes, I don't really know how to handle this. > > One thing I noticed though is that, contrary to what states the above > link, the value of NvOptimusEnablement doesn't matter. Even if it's > zero, the GPU will be used. So it's value can't be used to > enable/disable the feature... > > Regards, > > -- > Daniel Borges > Game Developer > +33 6 11 92 32 84 > http://pawarumi.com