PDA

View Full Version : Does anyone know of a fairly low-level, object-oriented abstraction on top of OpenGL?



_tague
06-24-2017, 06:52 PM
Hello! I've been trying to learn opengl for the millionth time - clicked and copy-pasted my way through various tutorials, had loads of frustration whenever my simple triangle would not display on the screen, and then suffered further as I slowly built up an absurd and unmanageable bunch of source code that hardly does anything. I am finding OpenGL far too difficult and confusing and want to know of a simpler way to draw things on the screen.

Is there any C/C++ library that provides a fairly low-level abstraction on top of OpenGL? Something that I can import meshes and textures and such into, but *not* a full game engine. Something like threejs (http://threejs.org) but for C++?

larryl
06-24-2017, 09:13 PM
I'm also a newbie and unaware of any abstractions of OpenGL.

I would recommend that you take a crack at this tutorial (https://learnopengl.com/#!Introduction) before giving up.

It's highly regarded in this forum.

viemamdao_123
06-24-2017, 09:35 PM
I'm also a newbie and unaware of any abstractions of OpenGL.

I would recommend that you take a crack at this tutorial (https://learnopengl.com/#!Introduction) before giving up.

It's highly regarded in this forum.
I also suffer from this case and then I give up

Cornix
06-25-2017, 01:20 AM
Low-Level and Object-Oriented is kind of a contradiction with OpenGL.
In java there is LWJGL (the Light Weight Java Gaming Library) which is a low-level binding for OpenGL but with a little bit less error potential by design.

The more object oriented the framework becomes the less low-level it will be.

john_connor
06-25-2017, 01:46 AM
I've been trying to learn opengl for the millionth time ... I am finding OpenGL far too difficult and confusing and want to know of a simpler way to draw things on the screen.

a "graphics engine" can help you drawing, if you dont understand how to load / what to do with textures / meshes / etc, a low-level API (that is openGL) doesnt help you any further

https://www.sfml-dev.org/tutorials/2.4/graphics-sprite.php
http://www.openscenegraph.org

GClements
06-25-2017, 03:53 AM
Is there any C/C++ library that provides a fairly low-level abstraction on top of OpenGL? Something that I can import meshes and textures and such into, but *not* a full game engine. Something like threejs (http://threejs.org) but for C++?
No. Such a thing wouldn't be much use for learning. The main issue is that performance usually matters, which means that you need to manage your data in a way that's convenient for OpenGL, which means understanding exactly what OpenGL is doing. Any kind of abstraction is likely to get in the way of that.

Silence
06-25-2017, 07:02 AM
There is OGLPlus (http://oglplus.org/). I don't know if this is still relevant (never used it).
You might also be interested in bgfx (https://github.com/bkaradzic/bgfx). This is not just an abstraction over OpenGL, but this is a complete rendering library which is also compatible with DirectX and other libraries.

_tague
06-29-2017, 08:04 AM
I'm also a newbie and unaware of any abstractions of OpenGL.

I would recommend that you take a crack at this tutorial (https://learnopengl.com/#!Introduction) before giving up.

It's highly regarded in this forum.

What a coincidence, I'd just started that tutorial a few days before receiving this reply! I've actually managed with it much better than I ever did with open.gl or any other tutorials!