MinGW + OpenB3D problems
It seems it remains a mystery how to properly setup a simple OpenB3D context example using C/C++ so I got curious and decided to get my hands a little dirty.. as I was also planning of having OpenB3D as a render engine candidate with BlitzX, so it is aligned with the OpenB3DMax userbase.
I'm using glut/freeglut as the context and the first problem that I have stumbled upon is the #include
no such file included error which is not part in MinGW standard libraries if I'm not mistaken. I do recall this is also a problem building with the android platform.
Any ideas Mark?
Well, no I think list is there in MinGW, I would think you don't have the right include paths set up.
Thanks Mark. it's weird, I only have it in my boost include directories (list.hpp) and nothing else. I have 4.8.1 and 5.1 same issue.
Well list is part of libstdc++ (c++ standard library) and the file is named stl_list.h (and forward_list.h) and is stored in MinGW under lib/gcc/x86_64-w64-mingw32/x.x.x/include/c++/bits.
Ah yes, forgot about that. I did already include the standard libraries and now it's throwing a lot of compiler errors related to openb3d (gcc 4.8.1 and 5.1).
Do you know of or have any project related to this? It would be nice if Angelo can provide some basic build example framework in the package other than just sources.
No, I've never tried a context in C++, I suggest you look for a GLUT Opengl framework to get you going, it won't be much different.
I see. Actually, I already got that GLUT context part working, it's the C/C++ OpenB3D implementation with GLUT that I'm now stuck with. :-/
Well maybe I could take a look. What IDE are you using? Is it a c++ project? You're not using the makefile to build a dynamic library? Why did you choose to use GLUT?
I'm just using notepad and through commandline to compile the source for the glut context. I'm doing the same with OpenB3D as I thought it should be straightforward with glu/glut.
As for choosing glut (freeglut), I have read from an old posts that it is one of the preferred or just mentioned.
Edit: Quick mistake as I forgot to include the actual openb3d cpp sources and yea I think it is better to build the sources as a library at least. I did not notice the makefile before and now trying to build it with MinGW
So I see that glee is the default gl context used after checking the makefile, already build the dynamic library openb3d.dll and now I have to revise my sample code again to use glee nstead.
I'm still eager to use freeglut as I am more familiar with it and maybe build openb3d dll with it when I get a chance. Freeglut is also available in Android/mobile so I got interested in it
btw looking forward to your sample as well Mark. Let me know how it goes, cheers.
Well you should probably use either Eclipse or Visual Studio Code to build your C++ projects, they're both free.
You just need to alter the includes to point to Glut in the Openb3d cpp files (also project.h) and then you can build a static library. I wrote a header file (glew_glee.h) to allow use of Glee or Glew although it's only set to build Glee on older Macs that wouldn't build Glew.
Yes when building the makefile it uses Glee, I think I had trouble trying to get it to use Glew, not sure I succeeded, so that's another reason I recommend the static library, also functions.h is used to build DLLs and I haven't updated it in ages.
Yes, I do use VS Studio a lot, but in this case I just thought since the openb3d sources uses makefile, I guess I really did not bother to create a project and just went away with the makefile method and mingw.
With that aside, another puzzle that I am trying to solve is the process and steps involve to create a camera and show a simple cube along with the GLee GL context.
For example, do I need to invoke Global::Graphics() first? What does the RenderWorld with main loop with Glee look like?
Yes, I did see the glew glee header file you got there for openb3dmax and that was a great addition to your package.
Ugh, well time for a progress report.
The good news is I can reproduce your include list error, it's in texture.h and it seems to be when the source files are put in a local folder, when I had everything in the main project folder I got a successful build, well not immediately, I had to remove voxterrain and edit bmax_debug as it uses blitz functions.
It seems if you create a managed project this won't allow subfolders, so you've to use the other/standard make option, but the eclipse help is quite out of date and I haven't been able to figure out how to set this up yet.
Meanwhile, I found a good intro to using Freeglut http://www.lighthouse3d.com/tutorials/glut-tutorial/
nice one Mark! I actually linked against the DLL directly as it is more easier to build with a sample, it only requires the dynamic stdc++ dll as well which is not a big issue.
Yes, between all GL helper libraries, freeglut seems to be the most easiest to get started, at least for me. 👌
Hey Mark, any news from Angelo on how to bootstrap OpenB3D with just C/C++? A simple Hello Cube would do
Reply To Topic
Please log in to reply