Quote: "I don't believe a teacher would ask something that naive and stupid."
I think perhaps you do the teacher an injustice here. An essay like that surely isn't meant to end with a definitive answer one way or the other; it's just a mechanism for getting the student to demonstrate their understanding of the tradeoffs between such radically different technologies. Like you say, I'd have thought the "right" answer here would be "it depends" + a good explanation.
Quote: "If anyone is familiar with both OpenGL and DarkBASIC, could you please spare a few minutes to explain which of the two you consider to be better, and the reasons why?"
As TheComet says, this is highly subjective and entirely dependent on your individual circumstances. Having experience with both, a few things I'd say off the top of my head would be:
- Properly optimised, OpenGL & C++ could be made to run many times faster than DBP.
- C++ provides much more powerful abstractions (specifically OO & templates) for organising large code bases.
- OpenGL & C++ are both open standards, and so the potential for porting to other platforms is much greater than with DBP.
- OpenGL & C++ are both still actively supported by their respective standards committies, and mainstream implementations are still supported by their developers, whilst DBP is no longer being actively developed (at least from the communities perspective - there may be some in-house work being done on it for FPSCR).
- OpenGL provides support for more modern hardware. DBP is still based on DirectX 9 and so offers no support for new functionality such as the geometry and tesselation shaders. With OpenGL, it's entirely up to you which OpenGL standard you work with and therefore which functionality you have access to.
On the other hand...
- DBP provides a much higher level of abstraction from the graphics hardware than OpenGL (you deal in objects not vertex buffers), thereby speeding development times for small projects and prototypes.
- Writing C++ & OpenGL doesn't make your code faster by default. If you don't have any experience in optimising graphics and don't have the time to learn, it may well be that DBP is faster. Modern OpenGL
can be faster, but it's reliant on you to make it so.
- DBP is an all-in-one package, and plugins are generally trivial to install. C++ & OpenGL on the other hand will not provide all of the functionality available in DBP on their own. You will need to add additional libraries such as GLM for 3D maths, something like fmod for sound etc.
Anyhow that's not meant to be definitive in any way, it's just a few thoughts from my own experience. In the end though, I think it really boils down to the old trade off between flexibility and speed (provided by OpenGL & C++) and ease of development (provided by DBP). In my own small projects, the thing that has driven me over to C++ has never actually been the need to optimise or customise the engine code; it's always just been a question of maintainability. That's the first thing you miss from C++ I think as your project grows. By the time you start bumping up against the speed and flexbility boundaries of DBP, I'd have thought you'd already have hit the limits on maintainability. Anyway I hope some of that helps. Good luck with the essay.