openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

enabling EGL_EGLEXT_PROTOTYPES #104

Closed jvcleave closed 11 years ago

jvcleave commented 11 years ago

In working on an OMX player I trying to use the function eglCreateImageKHR which requires

#define EGL_EGLEXT_PROTOTYPES 1

Should this be done in core ofConstants.h?

https://github.com/raspberrypi/firmware/blob/master/opt/vc/include/EGL/eglext.h#L89

bakercp commented 11 years ago

Maybe in the platform specific makefiles for the moment?

Here perhaps?

https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworksCompiled/project/linuxarmv6l/config.linuxarmv6l.default.make#L87

bakercp commented 11 years ago

i.e.

...
PLATFORM_DEFINES += USE_EXTERNAL_LIBBCM_HOST
PLATFORM_DEFINES += USE_VCHIQ_ARM
PLATFORM_DEFINES += EGL_EGLEXT_PROTOTYPES
...
bakercp commented 11 years ago

I'm curious to know where they define it in omxplayer.

https://raw.github.com/huceke/omxplayer/master/Makefile

It's not in their makefile ... so it must be elsewhere.

bakercp commented 11 years ago

Also, I've been meaning to add public const getters for the EGL window vars in this section:

https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworks/app/ofAppEGLWindow.h#L206

If you need them for omxplayer, let me know and I can expose them (or you can).

jvcleave commented 11 years ago

according to grep it looks like omxplayer isn't using eglCreateImageKHR

bakercp commented 11 years ago

Have you confirmed that this needs to be added at a platform/conditional core level? Are there any disadvantages to doing that?

jvcleave commented 11 years ago

it can be done with PROJECT_DEFINES = EGL_EGLEXT_PROTOTYPES in config.make inside a project

arturoc commented 11 years ago

i've added it in ofConstants.h we have similar defines for the gl extensions in linux and android so i think it's ok to have it there