pigu icon indicating copy to clipboard operation
pigu copied to clipboard

No Extension Checking Facility

Open Rexhunter99 opened this issue 11 years ago • 4 comments

No library specific means of checking for a supported extension of EGL/GL

Rexhunter99 avatar Jan 25 '14 00:01 Rexhunter99

Hmmm not sure if you still check this GIT anymore buddy but I forked it and am looking at giving you a hand if I can, a GLFW style, lightweight library for the Pi would be amazingly useful.

So... piguExtensionSupported( c-string ) is going to be a bit of a mammoth in terms of processing and memory footprint, should we store a struct with a bitfield of booleans?

stuct { int egl_extension1 : 1; int egl_extension2: 1; int egl_extension3 : 1; int egl_extension4 : 1; int egl_extension5 : 1; int egl_extension6 : 1; int egl_extension7 : 1; int egl_extension8 : 1; } extension_list_s;

You already have a structure containing all the state information of the library, and a bitfield will give us a better memory footprint. We can process the extensions during piguInit and return the result via an enum supplied to piguExtensionSupported() instead of a string?

Rexhunter99 avatar Jan 25 '14 00:01 Rexhunter99

Hi, my focus has somewhat shifted away from this. As far as PI gl support libraries go I put some effort into GLWT (https://github.com/rikusalminen/glwt my linux_app_event branch contains most of the PI relevant stuff i think). The problem there has been that the GLWT API hasn't settled on a way to expose non keyboard/mouse controllers. Anyway as far as PIGU goes I'm not really sure if it needs a extension query mechanism? Do exposed extension vary between PI firmware versions or so? I figured since the library is fixed to a specific platform you could just know a priori which extensions are supported without any need for runtime checks.

progschj avatar Jan 25 '14 11:01 progschj

While you're right when it comes to vanilla flavour distros on the PI, software implementations can change over time or be modified whenever a user feels like digging into the drivers guts. Look at MESA, while my hardware doesn't change, there are new extensions every so often that I can expose and utilise, very useful.

Rexhunter99 avatar Jan 25 '14 11:01 Rexhunter99

Isn't checking availability of extensions via glString(GL_EXTENSIONS)/eglQueryString(display, EGL_EXTENSIONS) sufficient for this case? Since the entry points are provided in the respective _ext headers anyway. I have to admit I have never bothered with gles extensions.

progschj avatar Jan 25 '14 11:01 progschj