Posts: 89
Joined: Jan 2010
Reputation:
1
Do the XBMC developers have any kind of policy on the use of OpenGL extensions specific to a particular vendor?
Mitigating circumstances are nVidia specific extensions used in conjunction with VDPAU.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
it's fine as long as it doesn't mean it break other things...
Posts: 89
Joined: Jan 2010
Reputation:
1
OK here are 2 scenarios:
A person builds XBMC on a system with nVidia drivers (and OpenGL headers) installed. The nVidia extensions are used in conjunction with some VDPAU stuff.
A person builds XBMC on a system with AMD drivers installed. The compilation throws errors because the nVidia extension prototypes don't exist in the AMD OpenGL headers, even though that code will never be used in an AMD video system.
I guess the source file using the nVidia extensions needs some #ifdef statements to detect the vendor and avoid whole sections of code referencing extensions that will otherwise not exist?
Thanks
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
uhm, isn't the whole point to glext's that it is something you probe for, and use if available?
e.g. i haven't seen games with binaries for amd/nvidia for many a moon (granted, most of them are dx but still...)
Posts: 89
Joined: Jan 2010
Reputation:
1
My understanding of GL extensions might be quite basic. The way I understand it you either use the function call prototype defined in the GL extension header or you use getProcAddress to get the function address using the typedef of the function also in the GL extension header. Either way the vendor specific header is still required.
Can you point to any examples of GL extensions in the XBMC code?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
see RenderSystemGL.cpp.
e.g. if (glewIsSupported("GL_ARB_shading_language_100"))
glew takes care of defines etc.
Posts: 89
Joined: Jan 2010
Reputation:
1
Thanks
I need to read up on glew.
Posts: 89
Joined: Jan 2010
Reputation:
1
I found the glew source code in the projectM directory.
It's 4 years old and the extension I need (NV_vdpau_interop) is not there.
Either I'm looking in the wrong place or this needs updating.
Posts: 89
Joined: Jan 2010
Reputation:
1
OK thanks yes I'm looking in the wrong place. Glew would be a system library and not part of XBMC.