Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
LearnOpenGL
Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
OpenFrameworks
openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
Maybe https://shadered.org/ would be a better workspace for you to get started rather than bootstrapping from int main() {}
Personally I've built my own abstractions to help with development. It does take time, but this is what many people do, as almost everyone has slightly different goals and preferences. For example, I just want to write shaders. So I've tried to minimize all code that is not a shader, and made a system where shaders live along the host code to make editing them more convenient. This is what the latest iteration looks like.
Yup, the project setup hassle is real. It's easy to get an idea and start working on the plumbing, then to lose interest because it's taking too long. Especially if you can't even get to the main thing in a single sitting. Helpers like Shadertoy make it easier to jump right into it, but are always limited in some ways (fundamentally; otherwise they'd be as complex as whatever you tried to avoid). Game engines and frameworks like Unity and Unreal might be even better for this but have more stuff to learn. Even a modeling software like Blender might be pretty neat for just having fun with graphics, though there you do programming visually with nodes which is not for everyone. To the other extreme, it's also possible to follow something like learnopengl or directxtutorial, take a complete example and play with the shaders/geometry processing/whatever you wanted to explore.
https://github.com/ocornut/imgui pre-setup to run on https://github.com/floooh/sokol all merged into 1 .h and 1 .cpp
https://github.com/ocornut/imgui pre-setup to run on https://github.com/floooh/sokol all merged into 1 .h and 1 .cpp
Processing.org has one of the easiest to use graphics programming environments. It's a simplified wrapper around Java and, for good or for ill, hides all the opengl calls behind its own graphics calls. It's easy to use vertex and fragment shaders, but beyond that you have to go under the covers and deal with jogl directly. Or you can use its p5.js javascript mode as a wrapper around webgl. In either case it's dead-easy to use for simple toy projects, e.g. like this (see the full code in the comments).
Or if you prefer C++ and a bit lower level, closer to the graphics libraries, take a look at openFrameworks.