That bus error: Reproducible and with all gl calls!
It looks like all OpenGL methods are giving me bus errors! Meep! -- --Timothy.
I also reproduce this on the experimental branch, and it's crashing inside OpenGL. Maybe something needs to be done first, before calling OpenGL? I know it's working nice inside a Cocoa application context. I reproduce the same crash with Ruby 1.8 + RubyCocoa too: $ ruby -r osx/cocoa -e "OSX.require_framework 'OpenGL'; p OSX.glMatrixMode(OSX::GL_PROJECTION)" Laurent On May 4, 2009, at 2:38 PM, Timothy McDowell wrote:
It looks like all OpenGL methods are giving me bus errors! Meep!
-- --Timothy. _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
I also reproduce this on the experimental branch, and it's crashing inside OpenGL. Maybe something needs to be done first, before calling OpenGL? I know it's working nice inside a Cocoa application context.
I reproduce the same crash with Ruby 1.8 + RubyCocoa too:
$ ruby -r osx/cocoa -e "OSX.require_framework 'OpenGL'; p OSX.glMatrixMode(OSX::GL_PROJECTION)"
And also with a simple C program: ~/tmp% cat e.c #include <OpenGL/gl.h> int main() { glMatrixMode(GL_PROJECTION); return 0; } ~/tmp% cat e.c #include <OpenGL/gl.h> int main() { glMatrixMode(GL_PROJECTION); return 0; } ~/tmp% gcc -framework OpenGL -o e e.c ~/tmp% ./e zsh: bus error ./e So as Laurent said, it's probably just an initialization problem.
On 5 May 2009, at 00:17, Vincent Isambart wrote:
I also reproduce this on the experimental branch, and it's crashing inside OpenGL. Maybe something needs to be done first, before calling OpenGL? I know it's working nice inside a Cocoa application context.
I reproduce the same crash with Ruby 1.8 + RubyCocoa too:
$ ruby -r osx/cocoa -e "OSX.require_framework 'OpenGL'; p OSX.glMatrixMode(OSX::GL_PROJECTION)"
And also with a simple C program: ~/tmp% cat e.c #include <OpenGL/gl.h>
int main() { glMatrixMode(GL_PROJECTION); return 0; } ~/tmp% cat e.c #include <OpenGL/gl.h>
int main() { glMatrixMode(GL_PROJECTION); return 0; } ~/tmp% gcc -framework OpenGL -o e e.c ~/tmp% ./e zsh: bus error ./e
So as Laurent said, it's probably just an initialization problem.
You need to create an OpenGL context first before you can call any OpenGL methods. The developer samples will show you how to do this. Dave.
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (4)
-
Dave Baldwin
-
Laurent Sansonetti
-
Timothy McDowell
-
Vincent Isambart