My program was originally compiled on Mac OSX with RB 5.5.5 but it crashes when compiled on RB 2006. It crashes when the program accesses an OGL section of my program. Someone else wrote the OGL code and I do not understand how it works.
Here is the line that causes the crash:
 GrafPtr = GetWindowPort(gl_draw)
It is in the following function:
Function aglSetDrawable(gl_ctx As Integer, gl_draw As Integer) As Boolean
  #pragma DisableBackgroundTasks
  dim GrafPtr as integer

  #if TargetMacOS then
Declare Function callGL lib kAGL_Lib alias "aglSetDrawable" (ctx as integer, draw as integer) as boolean
  #endif

  #if targetCarbon then
Declare Function GetWindowPort Lib kAGL_Lib (window as integer) as integer
  #endif

  #if targetPPC then
    return callGL(context, windowptr)
  #else
    // App Crashes here
GrafPtr = GetWindowPort(gl_draw)// <<<<<<<<<<<<<<<< •••••••••••••••••••••• CRASH
    //
    return callGL(gl_ctx, GrafPtr)
  #endif
End Function

RB tech support suggested that it may be a plugin problem, but I can't find any relevant plugins. There is an OpenGL folder with a bunch of RB classes. They are as follows:

AppleAGLParsed.rbo
GLULibraryParsed.rbo
LibraryNameConstants.rbo
Math_OGL.rbo
NullMemoryBlock.rbo
OpenGLLibraryParsed.rbo
SetUpOpenGLContext.rbo

Do I need to update some of these classes to make my app compatible with RB 2006 ?
If so, please let me know where I might find them.
Thanks
Barrie

_______________________________________________
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>

Reply via email to