Results 1 to 1 of 1

Thread: EGL contexts with SDL initialization

  1. #1
    Newbie Newbie
    Join Date
    May 2013
    Posts
    1

    EGL contexts with SDL initialization

    Hi.
    When I initialize an OpenGL context with SDL 1.2, GLX is able to retrieve it, but EGL can't.
    Code :
    gcc -o egl egl.c -lX11 -lEGL -lSDL -lGL
    Code :
    #include <EGL/egl.h>
    #include <GL/glx.h>
    #include <SDL/SDL.h>
     
    int main(){
      SDL_InitSubSystem(SDL_INIT_VIDEO);
      SDL_SetVideoMode(200, 200, 0, SDL_OPENGL);
     
      printf(eglGetCurrentContext() == EGL_NO_CONTEXT ? "EGL KO\n" : "EGL OK\n");
      printf(glXGetCurrentContext() == NULL           ? "GLX KO\n" : "GLX OK\n");
     
      return 0;
    }
    This code displays "EGL KO" and "GLX OK"
    Is it the expected behavior ? If it is, how can I retrieve the OpenGL context ?
    Thanks for your help
    Last edited by azmeuk; 05-02-2013 at 06:33 AM.

Similar Threads

  1. WGL Initialization Questions
    By CornyKorn21 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-24-2013, 09:18 AM
  2. initialization of FBO
    By schr_10 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-31-2010, 06:01 AM
  3. glx 1.4 initialization
    By Y-tension in forum OpenGL: Linux
    Replies: 4
    Last Post: 02-26-2009, 09:37 AM
  4. initialization
    By fox in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-25-2002, 11:01 AM
  5. initialization
    By atifah in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-02-2001, 02:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean