GiftedButLazy
Posts: 1
Joined: Fri Dec 27, 2013 11:40 pm

OpenGL ES problems migrating from old to new

Sun Feb 14, 2016 9:26 pm

I have a work in progress using the old ES drivers so my intention is to change to/try OpenGL, as the new drivers also support OpenGL ES I decided to try ES first without much luck so far.

First of all I am using SDL 1.2 for input, when I call SDL_Init with the SDL_INIT_VIDEO flag my program switches to the console which seems odd, when I call SDL_SetVideoMode it doesn't return, does SDL 1.2 simply not work with this driver?

If I comment out the SDL stuff then when I call eglCreateWindowSurface I get EGL_BAD_NATIVE_WINDOW as an error, I pass null for the window parameter which gives me fullscreen with the original driver, what should I pass? something X related I assume. Can I get the X window from an SDL window? I would like to be able to run in a window and also fullscreen, is this possible? I've never done anything with X before...

Is there some example GLES code (using X) that compiles/works on a raspberry pi? The examples in opt/vc don't work with the new driver, should they? As they use dispmanx I assume they shouldn't.

Do I still need to call bcm_host_init()? If I do call it eglCreateWindowSurface never returns.

Thanks

Return to “Graphics programming”