Results 1 to 5 of 5

Thread: using dglOpenGL on linux

  1. #1

    using dglOpenGL on linux

    I wanted to check if my game will start up on linux but looks like opengl rendering context is set/used in different way than on windows. dglOpenGL page and forum is in german so maybe someone has simple tut/example that sets the context on linux?

  2. #2
    That is another reason why i use TOpenGLControl with dglOpenGL, for easy cross-platformity.
    Last edited by User137; 14-07-2013 at 10:32 AM. Reason: typo on TOpenGLControl

  3. #3
    The context creation functions in our headers for windows are just helper functions, and the header can be used as long as you have a render context, no matter how you created. If you're using lazarus I'd suggest using the TOpenGLControl. It abstracts creating the render context.

    With the OpenGLControl it's pretty straightforward using our headers :
    Code:
    InitOpenGL;
    GLControl.MakeCurrent;
    ReadImplementationProperties;
    ReadExtensions;
    If you don't want to use it you'll have to create your render context with the OS-specific functions like glXCreateContext on linux and aglCreateContext on Mac OSX. Maybe I'll put some helper functions for abstracting that into our headers, but right now you either have to use the TOpenGLControl or call the aforementioned functions to create a valid rendercontext yourself.
    Last edited by Sascha Willems; 14-07-2013 at 08:44 AM.

  4. #4
    I tried that, doesn't crash but TOpenGLControl is all white

  5. #5
    That's only the initialization stuff. How do you draw? And does GLControl.MakeCurrent return true (which means you've got a valid render context)? I'm using it for the linux port of my game and it works fine as long as you've setup OpenGL on linux to work.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •