-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi Brucey & co, hope you're well.
I'm messing about with OpenGL and was talking to AI about getting a GLFW-init'd GL ES 2.0 context to use the Angle DLLs (trying to replicate what Mark had done with Monkey2), more out of interest than anything. (Revisiting my attempts at a simple 3D engine.)
It told me to build GLFW with EGL instead of WGL, and I tracked down mod\glfw.mod\glfw.mod\source.bmx, which I've hacked like so in the vague hope it'll be that simple (or just require a few tweaks):
'Import "glfw/src/wgl_context.c"
Import "glfw/src/egl_context.c"
But this caused quite a few build errors on using MaxIDE's Build Modules, eg.
mod\b3d.mod\assimp.mod\assimp.bmx:
Import Openb3dlibs.Assimplib
Seems this should be:
Import b3d.Assimplib
(There is no Openb3dlibs as far as I can see.)
And similar in mod\b3d.mod\newtondynamics.mod\newtondynamics.bmx
(There might have been 1 or 2 more.)
I've also run into mod\bah.mod\sstream.mod\sstream.bmx giving a stat_ () error, where I had to change from:
Local Mode:Int,mtime:Int,ctime:Int
If stat_( path,Mode,size,mtime,ctime )=0
... to:
Local Mode:Int,mtime:Int,ctime:Int,atime:Int
If stat_( path,Mode,size,mtime,ctime,atime )=0
(Missing 'atime' in both lines. Interestingly, FileSize in FileSystem uses a full atime call.)
My current build error is this in mod\bah.mod\dboracle.mod\dboracle.bmx:
Local strings:Byte Ptr[]
Local blobs:Byte Ptr[]
Local dates:Byte Ptr[]
If values Then
Local paramCount:Int = bindCount
params = New Byte Ptr[paramCount]
strings = New Short Ptr[paramCount]
Notice strings is defined as Byte Ptr[] but is being assigned a short pointer. Not sure if that should work, but I get 'Unable to convert from Short Ptr Array to Byte Ptr Array' (bcc says it's 0.136.)
Converting the assignment to Byte Ptr seems to get past that, but gives, later in same file:
Unable to find overload for freemem2(Byte Ptr Array). Argument #1 is "Byte Ptr Array" but declaration is "Short Ptr Array".
Changing the definition to Short Ptr instead seems to work, but now getting 'Can't find interface for module 'pub.libpng'' in:
mod\bah.mod\magick.mod\source.bmx
Just documenting these while I can! Suspect I'm in a bit of a rabbit hole but pushing onwards!