简体   繁体   中英

Mesa headers with NVIDIA drivers (linux)

I'm trying to make sens of all this

I installed the nvidia drivers (343.36). However when i installed it via smxi it didnt install the opengl headers (gl.h and company). I hear that mesa-common-dev contains those file, but mesa is part of the DRI drivers. It is safe to use mesa headers with nvidia drivers or are they 2 different things ?

How does GLEW fit into all this ? I know it loads opengl function at runtime. But must I use a special nvidia version of glew ?

What about the compiled software ? It will be compiled using an NVIDIA card and headers, if i launch the program on a computer with an ATI card, will the software work ? Will it be hardware-accelerated ?

It is safe to use mesa headers with nvidia drivers or are they 2 different things ?

It should be. The headers simply specify what functions exist and what types they accept/return, which doesn't change from implementation to implementation (otherwise you'd have to make a version of your program for every single OpenGL implementation, which isn't feasible). Be sure that the gl.h file isn't just hiding in some subfolder in /usr/include however.

How does GLEW fit into all this ?

GLEW is built on top of OpenGL, which, as stated previously, has the same API no matter what implementation you use. There is no "nvidia version" of GLEW (However, the functions for getting extensions are dependent on the OS you use. GLEW takes care of that for you though).

What about the compiled software ?

Headers are only used during compiling; once you have the binary, they aren't needed anymore to run the program (In fact, the reason you have to install -dev versions of libraries is to get the headers.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM