Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Laptop Graphics Cards  (Read 2488 times)

0 Members and 3 Guests are viewing this topic.

Macecraft

  • Guest
Laptop Graphics Cards
« on: June 13, 2017, 09:53:16 pm »
Hi!

I've been using SFML 2.4.2 with Visual Studio 2015 to create a computer game. The game works fine but I'm just having an issue. I develop on a laptop with a gaming gfx card (960M) and an integrated desktop card (Intel HD Graphics 530).

When I'm running the game through Visual Studio it doesn't alternate to my dedicated graphics card like other computer games do. I have to run the game externally and select use the Nvidia card. The Intel card causes a game FPS drop below the 60 that it is capable of achieving on dedicated cards. Is there anything specific I need to do to get it to always run with the Nvidia card.

I have profiled the game numerous times and I'm 100% sure the reason I'm not achieving 60 is that the card it's being run on is the Intel. Once I switch to the dedicated card I get the performance I desire.

Macecraft

  • Guest
Re: Laptop Graphics Cards
« Reply #1 on: June 13, 2017, 10:35:35 pm »
Nevermind, I found a solution online through stackoverflow!

Sent from my SM-G920F using Tapatalk


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Laptop Graphics Cards
« Reply #2 on: June 13, 2017, 10:53:59 pm »
Can you provide a link to said solution, so others could maybe find it as well in the future?

Btw. if you link sfml-main, SFML should use your dedicated GPU.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Macecraft

  • Guest
Re: Laptop Graphics Cards
« Reply #3 on: June 14, 2017, 12:28:21 am »
Can you provide a link to said solution, so others could maybe find it as well in the future?

Btw. if you link sfml-main, SFML should use your dedicated GPU.

Sure thing! The link I found which solved my problem is:
https://stackoverflow.com/questions/10535950/forcing-nvidia-gpu-programmatically-in-optimus-laptops

And I did link sfml-main, it has worked on previous versions of SFML 2.0 but for some reason, on this project specifically, I've had this issue. Previous SFML projects of mine have never had this issue. I'll probably investigate further when I have the time and update my post with the cause of my problem incase anyone else gets the issue in future.

--

Update: I tell a lie, it seems I had linked sfml-main on my previous projects but had neglected to do so on this one! Thanks for the helpful tip!
« Last Edit: June 14, 2017, 12:31:29 am by Macecraft »