Open BradWBeer opened 10 years ago
segfaults are often caused by uninitialized variables; you should look at you code and make sure you initialized all your vars, including globals (with functions like SDL_GL_CreateContext()
, which does a lot behind the scenes).
You might want to take a look at this for more explanations ;)
You are correct. I needed a call to a library which sets up the OpenGL function pointers. However when I use GL::LoadExtensions() I get 74 warnings:
Warning: type of symbol `glEndTransformFeedback' changed from 2 to 1 in /home/brad/work/external/OOGL/lib/OOGL.a(Extensions.o)
Using GLEW gives me conflicting definition errors for the function pointers. Is there a better way? I really like OOGL from what I've seen of it, and I would like to use it without heavily modifying it.
Finally, can I add a function to create a window object from a preexisting window? Then I can use the gl object proper.
Thanks!
That error sounds like you need to recompile the object, but I can't help you with the rest: I'm a complete noob with OpenGL, and I haven't used OOGL yet. Good luck!
type of symbol ... changed from X to Y
erros indicate you have same function defines two times, most probably its a conflict of SDL_gl.h
and OOGL
. As to creating an OOGL::Window
object from existing SDL_Window
, you would need to obtain the real window decriptor from SDL2
(look into SDL_syswm.h
for that) and roll your own Window
constructor like that one in OOGL/src/GL/Window/Window_X11.cpp
I could not get SDL2 to play nicely with OOGL's window class. I've hacked out the windowing and platform specific code as well as the extensions code in favor of glew. I'm not sure if anyone wants this, but I'm willing to share.
I'm trying to use SDL2 with OOGL and I've copied the relevant parts of the triangle sample. It gives a segmentation fault at the first call to create the vertex shader. This must have something to do with using SDL2 and not creating a window. Is there an example for using OOGL with other windowing libraries?
Thank you.