glfw

Xcode project setup for GLFW library reference problem.

Hi, I'm working on an assignment which is to simulate the beginning of the universe using C and OpenGL/GLFW. I'm pretty new to C and also to Xcode, which is not helping at all. I've overcome my silly compilation problems and the code is finding GL/glfw.h ok. When I compile and run I receive a "Visualisation [name of the project] has ...

How to maintain a list of functions in C++/STL ?

Hi, Before asking you my question directly, I'm going to describe the nature of my prolem. I'm coding a 2D simulation using C++/OpenGL with the GLFW library. And I need to manage a lot of threads properly. In GLFW we have to call the function: thread = glfwCreateThread(ThreadFunc, NULL); (the first parameter is the function that'll exec...

C With OpenGL and GLFW questions (Mainly a C question)

I am trying to build an application to simulate some basic spheres moving around for this assignment I have got. I am relatively new to C but I have been using .NET and java for some time. The problem that i am facing is that it doesn't look like the data is being assigned to the array outside of the init statement when i actually need...

How can a glfwSleep() cause a segfault ?

Hi, in my multithraded application, I'm using a sleep() function (the one from the GLFW library): glfwSleep(..); and it apparently leads my application to segfaulting as my call stack shows: #0 76CFC2BC WaitForSingleObjectEx() (C:\Windows\system32\kernel32.dll:??) #1 00000016 ??() (??:??) #2 0000006C ??() (??:??) #3 00000000 ??() (...

C++/GLFW - The right way to use Mutex objects ?

Hi, I'm working on a simulation that uses multithreading extensively. The thing is that, until now i've never used any mutex objects to protect my data. And the result, is that i'm getting bunch of segmentation faults.. I'm trying to lock/unlock with mutex while : reading/writing but that causes me another segfault : #0 77D27DD2 ntdl...

GLFW window fails to open (Ubuntu)

When compiling and running my GLFW-based C program under Ubuntu (9.04), it fails when trying to open the window (it compiles fine, having installed the latest GLFW). I've tried varying resolutions, going as low as 300x300, and left the bit depths to zeros, hoping a default will catch on. The relevant piece of code reads (directly snippe...

What am I missing in my compilation / linking stage of this C++ FreeType GLFW application?

g++ -framework OpenGL GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw -lfreetype - pthread `freetype-config --cflags` Undefined symbols: "_GetEventKind", referenced from: __glfwKeyEventHandler in libglfw.a(macosx_window.o) __glfwMouseEventHandler in libglfw.a(macosx_window.o) __glfwWindowEventHandler in libg...

How to make full-screened MacOSX bundle killable?

Exposition: I am writing an GLFW app on MacOSX. The app is a Mac bundle. I want my app to run in fullscreen mode (easy, use GLFW_FULLSCREEN). Problem is .. my code is still buggy, and I do not know how to kill a full-screened app that infinite loops (i.e. if the exit(0); is not called in the program; I don't know how to force kill it)....

c++ glfw macosx dim screen vs f1

I'm writing a GLFW app in C++ on MacOSX. It runs in GLFW_FULLSCREEN mode Now, when I press the "dim screen / f1" button, my Mac dims my screen. I do not want that to happen. Instead, I want GLFW to receive a "key press F1" event (or a "key press blah blah blah" event. Is there a way to tell MacOSX to NOT interpret the "dim screen" and...

OpenGL Not drawing

I am using GLFW as GUI for OpenGL projects. I am using my red book and testing code and well the first bit of code doesn't work at all. I want to say this is a GLFW problem because I don't have this problem in JOGL. #include <iostream> #include "GL/glfw.h" #ifndef MAIN #define MAIN #include "GL/gl.h" #include "GL/glu.h" #endif using nam...

GFLW threading tutorials

Hi everyone , i'm looking for some tutorials about Threads in GLFW ...