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

Author Topic: Mechanism to detect Intel cards  (Read 1835 times)

0 Members and 1 Guest are viewing this topic.

luiscubal

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Mechanism to detect Intel cards
« on: October 12, 2011, 05:45:58 pm »
I've been having trouble with intel cards so my game currently has two modes - with rendertextures and without rendertextures.
I can easily toggle on and off the RenderTextures, so I'd like to deactivate them only on Intel cards, since those seem to be the cards with problems.
I'd like SFML(and SFML.Net) to provide a call like "IsIntelGPU" or something like that, so that I could selectively enable some features.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6232
  • Thor Developer
    • View Profile
    • Bromeon
Re: Mechanism to detect Intel cards
« Reply #1 on: October 12, 2011, 06:19:53 pm »
Quote from: "luiscubal"
I'd like SFML(and SFML.Net) to provide a call like "IsIntelGPU" or something like that, so that I could selectively enable some features.
And then, another function like IsNvidiaCard() or IsAtiCard()? And maybe also a function for the processor and RAM manufacturer? ;)

In my opinion, this is far too specific for SFML. I don't know if it's even possible to check that easily. If it is, there are probably already existing libraries that do that. But anyway, I think we should rather attempt to fix the issues with Intel cards...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: first SFML book

luiscubal

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Mechanism to detect Intel cards
« Reply #2 on: October 12, 2011, 06:26:34 pm »
Quote
I think we should rather attempt to fix the issues with Intel cards...

That would be the best way. I just want this feature as a workaround until that happens.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32451
    • View Profile
    • SFML's website
    • Email
Mechanism to detect Intel cards
« Reply #3 on: October 12, 2011, 06:29:46 pm »
It's quite easy to do, even outside SFML. glGetString(GL_VENDOR) should return something containing "Intel". Don't forget to call this function when an OpenGL context is active.
Laurent Gomila - SFML developer

deadalnix

  • Newbie
  • *
  • Posts: 45
    • View Profile
Mechanism to detect Intel cards
« Reply #4 on: October 29, 2011, 01:38:20 pm »
Anyway, detect card vendor is mostly a bad practice. You should rely on card capabilities.

Detect the card vendor should be limited to workaround a nasty bug in the driver or some very specific issues like that. You'll go to a maintenance hell if you don't do that.

Just immagine what will happen if the same problem appears with some wideo card that is not from intel, or that intel produce a new videocard where this behaviour isn't anymore ?

luiscubal

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Mechanism to detect Intel cards
« Reply #5 on: November 07, 2011, 11:01:56 pm »
Unless the Intel RenderTexture bug is fixed, the only alternative is to disable RenderTextures entirely.
So the options are 1) disable RTs everywhere 2) disable RTs on Intel cards only
I think the option is quite clear.
Also, I don't think there's any way to detect this bug at runtime aside from vendor strings.