Kodi Community Forum
OpenGL extensions - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: OpenGL extensions (/showthread.php?tid=130576)



OpenGL extensions - Stu-e - 2012-05-03

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.



RE: OpenGL extensions - spiff - 2012-05-03

it's fine as long as it doesn't mean it break other things...


RE: OpenGL extensions - Stu-e - 2012-05-03

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



RE: OpenGL extensions - spiff - 2012-05-03

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...)


RE: OpenGL extensions - Stu-e - 2012-05-03

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?



RE: OpenGL extensions - spiff - 2012-05-03

see RenderSystemGL.cpp.

e.g. if (glewIsSupported("GL_ARB_shading_language_100"))

glew takes care of defines etc.


RE: OpenGL extensions - Stu-e - 2012-05-03

Thanks
I need to read up on glew.


RE: OpenGL extensions - Stu-e - 2012-05-03

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.



RE: OpenGL extensions - stourwalk - 2012-05-03

I'd hazard a guess you should be looking at libGLEW - which was on version 1.5.8 in XBMC, until it was recently updated in the mainline to 1.7.0 (for OSX at least)

Even so - 1.5.5 had support for the extension you were after - so it should be supported even in 11.0 - unless of course libGLEW isn't used anywhere other than OSX Smile

Just a drive-by comment..


RE: OpenGL extensions - Stu-e - 2012-05-03

OK thanks yes I'm looking in the wrong place. Glew would be a system library and not part of XBMC.