[vtkusers] Get Graphics card info

Simon ESNEAULT simon.esneault at gmail.com
Wed May 7 11:09:50 EDT 2014


Hi

Here, we use :

std::string l_gpu_info = std::string( (char*)glGetString(GL_VENDOR) ) +
std::string( (char*)glGetString(GL_RENDERER) ) + std::string(
(char*)glGetString(GL_VERSION) );
for( unsigned int i=0; i<l_gpu_info.length(); ++i ){
    l_gpu_info[i] = tolower(l_gpu_info[i]);
}

if( l_gpu_info.find( "nvidia" ) != std::string::npos ){
  std::cout<< "NVIDIA Card detected !" << std::endl;
}

Be sure to have a valid OpenGL context initialized before to call that.

Simon



2014-05-07 16:45 GMT+02:00 Doug Hoppes <dhoppes at mbfbioscience.com>:

>  Hi all... is there a simple way to get the name of the graphics card
> manufacturer?
>
>
>
> I would like to check if the user has an NVidia card or not.
>
>
>
> Doug
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
------------------------------------------------------------------
Simon Esneault
13 rue Vasselot
35000 Rennes, France
Tel : 06 64 61 30 94
Mail : simon.esneault at gmail.com
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140507/0803eaed/attachment.html>


More information about the vtkusers mailing list