Asher (or anyone else that wants to reply):
Thanks for everyone's responses. Well, I didn't know that the OpenGL call
was even necessary if using SpriteSurfaces but it looks as though it IS
necessary based on the responses so far and the Apple web site. Can someone
confirm this?
Would someone mind posting an example using canvas1 and OpenGL to
synchronize to vertical retrace? Here is the information that is needed but
that's about as far as I can get:
____________________________________________________________________________
Retrace synchronization can be achieved by using the AGL_SWAP_INTERVAL
constant. Normally OpenGL does not synchronize swaps to monitor vertical
retraces. This open loop design allows the shortest delays when calling
aglSwapBuffers but may result in visible ?tearing? as the retrace frequency
interacts with the context swap frequency. To force aglSwapBuffers to
synchronize with the next vertical retrace the following code can be used:
GLint sync = 1;
aglSetInteger (ctx, AGL_SWAP_INTERVAL, &sync);
______________________________________________
I copied the above text from the from the following link:
http://developer.apple.com/documentation/GraphicsImaging/Reference/AGL_OpenGL/Intro/chapter_1_section_1.html
The following text was copied from another REALbasic support message.
_____________________________
Dim swap As Integer = 1
Const AGL_SWAP_INTERVAL = 222
Soft declare function aglGetCurrentContext lib "OpenGLLibrary" () as integer
declare sub aglSetInteger lib "OpenGLLibrary" (ctx as integer, pname as
integer, ByRef params as integer)
______________________________
Will this work (I added the "Soft" to "Soft Declare Function"; is that
needed on REALbasic 2005 in this case)? If not, can anyone work up an
example on how to use these settings in RB?
Much appreciated.
Ken
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|