Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    SDL1.3 + OpenGL ES

    Reply
    jspenguin | # 1 | 2009-12-06, 13:01 | Report

    I'm trying to write an SDL/OpenGL ES application, and SDL tells me there is no OpenGL support in the video driver.

    Here is the basic test program:
    Code:
    #include <SDL/SDL.h>
    #include <GLES2/gl2.h>
    
    int main (int argc, char** argv) {
        SDL_Init(SDL_INIT_VIDEO);
    
        SDL_Surface* screen = SDL_SetVideoMode(800, 480, 16, SDL_OPENGL | SDL_FULLSCREEN);
        if (!screen) {
            printf("Error: %s\n", SDL_GetError());
            return 1;
        }
        SDL_Delay(3000);
        SDL_Quit();
    }
    I can compile it, but when I run it on the device, I get an error saying "No OpenGL support in video driver".

    Is there something I'm doing wrong?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jackabite | # 2 | 2009-12-06, 13:04 | Report

    you running it on the emulator or actual device ? I dont think the emulator supports OpenGL yet.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jspenguin | # 3 | 2009-12-06, 13:07 | Report

    I'm running on the device itself.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mikkov | # 4 | 2009-12-06, 13:09 | Report

    Are you sure that it's linked against SDL1.3 and not the default SDL1.2?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jspenguin | # 5 | 2009-12-06, 13:12 | Report

    Yes. Here is the output from ldd:
    Code:
    $ ldd glestest
            libSDL-1.3.so.0 => /usr/lib/libSDL-1.3.so.0 (0x4000b000)
            libGLESv2.so => /usr/lib/libGLESv2.so (0x45d70000)
            libc.so.6 => /lib/libc.so.6 (0x41028000)
            libm.so.6 => /lib/libm.so.6 (0x41320000)
            libdl.so.2 => /lib/libdl.so.2 (0x412c8000)
            libpthread.so.0 => /lib/libpthread.so.0 (0x41168000)
            libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41150000)
            libIMGegl.so => /usr/lib/libIMGegl.so (0x464d8000)
            libsrv_um.so => /usr/lib/libsrv_um.so (0x44e78000)
            /lib/ld-linux.so.3 (0x41000000)
    I tried it first with SDL1.2 and got a different error (something about not being able to load libGL.so)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jspenguin | # 6 | 2009-12-06, 13:20 | Report

    I just checked the SDL library and it looks like there are no references to any of the GLES functions.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout