So in my continued struggle to port the system developed in this book over to mac/open gl (in hopes of creating a 2d action game) I have encountered another problem:
Most of the core functions (VOnRender, VOnUpdate, etc.) in GameCodeApp are called through DirectX callbacks. As far as I know, OpenGL (i am using AGL, not GLUT) doesn't have anything like that.
What is the best way to do this on my own? While I was building up all the different classes I was just having a timer fire every millisecond and call VOnUpdate and then VOnRender but clearly that is wrong (the elapsedTime between timer shots goes from one millisecond to five hundredths of a second once VOnRender is put in the mix -- this doesn't seem right).
Most of the core functions (VOnRender, VOnUpdate, etc.) in GameCodeApp are called through DirectX callbacks. As far as I know, OpenGL (i am using AGL, not GLUT) doesn't have anything like that.
What is the best way to do this on my own? While I was building up all the different classes I was just having a timer fire every millisecond and call VOnUpdate and then VOnRender but clearly that is wrong (the elapsedTime between timer shots goes from one millisecond to five hundredths of a second once VOnRender is put in the mix -- this doesn't seem right).