OpenGL versions / Extensions under MacOSX

I would like to use VBOs with my program under MacOS …

Unfortunalty it result in a segfault or something, the program just stop:
#0 0x06abbc50 in ?? ()
#1 0x208cad44 in gleDrawArraysOrElements_Core ()
#2 0x20924088 in gleDrawArraysOrElements_VBO_Exec ()

I haven’t setup anything neither used GLEW, can’t I VBOs by default ? Which version of OpenGL is supported by MacOSX ?

Obviously, you need to check for the extension before you use it.

Since Mac OS X 10.4.3, VBOs are supported on all hardware.

You have some other bug.

I finally figure out that I had a lot of issues…
I tryed to render just clear the color buffer and it doesn’t work at all…

The point is I am actually do the OpenGL rendering in a separate thread, dedicated to it. But the windows remain created in the main thread. If I create a context on the main thread, I am able to render into it but it is obviously what I don’t want to do.

When I try to render from the draw thread, the windows remains in white… I create the context from this thread and it thread perfecting ok.

I am wondering if the issue come from the swap buffer operation and the way I initialize the surface and the context before a use ?

In which thread am I suppose to call aglSwapBuffers, aglSetDrawable, aglSetCurrentContext ? My main or my draw thread ?

Cheers

I forgot to say that I use AGL_BUFFER_RECT, I’am not sure as well where I should enable it, if it work on the current OpenGL context or the current Drawable or anything else…

OpenGL contexts are current to a particular thread. You must make the appropriate context current in the appropriate thread before you render to it.

OpenGL contexts are not thread-safe. You may only use each context from a single thread at a time. Use mutexes or CGLLockContext to ensure this.

These rules are not specific to Mac OS X.

I am already aware about these rules and I have applyed them on Windows and applied them the same way on MacOS… Unfortunatly, behind contexts, I mean on the AGL or Carbon side it should have some differencies.

Do you know anything about AGL_BUFFER_RECT or AGLDrawable that may my windows being white?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.