iDevGames Forums
openal coordinates vs. opengl coordinates - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: openal coordinates vs. opengl coordinates (/thread-8604.html)

openal coordinates vs. opengl coordinates - gerald - Feb 3, 2011 06:06 PM

This is probably a FAQ level question, but I've searched a bit and didn't find it so will ask here.

My basic question is whether you try to keep your openal coordinate system in sync with your opengl coordinates or if this turns out to be a bad idea.

For example, my app's opengl origin (0,0) is in the middle of the landscape-oriented screen. The -0.5 is the far left, 0.5 the far right. Same for top/bottom. Front to back (z) always ranges from 0.5 to -0.5, with the player/listener at 0.5.

Do these ranges work with OpenAL in terms of mono audio clips sounding like they are in different places (ie. left/right of the listener, some closer, some further away)? Or, is it better to translate the opengl coordinates to a different scale for audio?

The OpenGL stuff is working great and I don't want to change it if possible.

Again, if this is has already been answered feel free to reply with a pointer there.


RE: openal coordinates vs. opengl coordinates - OneSadCookie - Feb 3, 2011 10:04 PM

You may have to adjust the falloff in AL, but I would certainly keep the coords the same.