New topic: Missing OpenGL Documentation
<http://forums.realsoftware.com/viewtopic.php?t=30687> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message rdm Post subject: Missing OpenGL DocumentationPosted: Mon Oct 26, 2009 11:18 pm Joined: Mon Oct 26, 2009 10:53 pm Posts: 2 Can anyone point me to documentation of the version of OpenGL as implemented by REALbasic in the OpenGLSurface? I realize that this was a plug-in created by TinRocket, I have been to their site but it has absolutely no helpful documentation. I already have the Red Book and several other OpenGL books but I am working in 3D and they all make heavy use of GLUT for the viewing and modelling transformations, which is not included with OpenGLSurface. To make matters worse, many OpenGLSurface methods do not accept arrays but MemoryBlocks and it is not documented how the MemoryBlocks are to be filled. I even started translating some GLUT routines to REALbasic but the MemoryBlock issue, and the big differences between REALbasic's unique multidimensional array structure and C's array structure are making it almost impossible without some documentation. Top Phil M Post subject: Re: Missing OpenGL DocumentationPosted: Mon Oct 26, 2009 11:58 pm Joined: Fri Sep 30, 2005 12:18 pm Posts: 220 MemoryBlock can be used any way you want... its essentially raw data that you can work with, or to communicate with other APIs such as OpenGL. Create a OpenGLArray class and add the methods and computed properties to make it behave like an Array in REALbasic, but the MemoryBlock is the real meat of the class. For example, if you need an array of Floats, you set the size of the MemoryBlock to be 4x the number of singles in the array. Then when you are ready to pass your "array" into OpenGL, you define the "array" as type Pointer, and your data when you call the declare is the actual MemoryBlock... then REALbasic knows it needs to pass the data by reference instead of value. Top rdm Post subject: Re: Missing OpenGL DocumentationPosted: Tue Oct 27, 2009 12:34 am Joined: Mon Oct 26, 2009 10:53 pm Posts: 2 Phil M wrote:MemoryBlock can be used any way you want... its essentially raw data that you can work with, or to communicate with other APIs such as OpenGL. I understand how to use MemoryBlocks to store floats, doubles, etc. The issue is what array values are loaded in what positions in the MemoryBlock. For instance, are the values loaded by increasing x subscripts first or increasing y subscripts? This can only be answered by having documentation on how the routines that use the MemoryBlock expect the values to be loaded. Many of the OpenGL routines have implicit cascade effects, for instance glMultMatrixf uses only one MemoryBlock as input, so it must implicitly have the second matrix stored somewhere to multiply by. The order of the matrix values in the MemoryBlock is crucial since matrix multiplication is not commutative. I need the documentation of exactly what the OpenGLSurface methods expect for their input and output values in order to proceed. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
