I think you have a misunderstanding of what OpenGL is. OpenGL is an API for sending instructions to your GPU. It is a multi-platform alternative to Microsoft's DirectX, and recently there has been another multi-platform API called Vulkan. All three of these APIs can accomplish mostly the same things. It is rare that you'll find one that can magically do something a magnitude better than another, though I'm sure there's beneficial extensions that are unique to each one.
Most graphical libraries are most likely built on top of OpenGL or DirectX calls, so the most you can do is mask those low-level calls.
In OpenGL, one way to send data to the GPU is with glBufferData and glBufferSubData
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferData.xhtml
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferSubData.xhtml
glBufferData initializes a buffer's contents in the GPU, and glBufferSubData can updates parts of that existing buffer. I don't know what you mean by "library does not remember the object drawn". On every frame, the screen needs to be drawn, and it renders what it gets called to draw. If you need to update or change something, you need to make an API call to let the GPU know it needs to update or draw something.
Any basic loop in a graphical program will look like this:
Create window and other contexts
while (window is open)
{
get user input (optional)
update CPU-side data
update GPU-side data
draw to the window
} |
An example of what I would like to do is to have a form in which insert the module and the angle of 2 vectors and obtain the graphic representation of the vectors and their sum. |
You can certainly present this using OpenGL or other higher-level libraries.
If your question is about the math itself, like in your title, I would check out libraries like GLM: OpenGL Mathematics.
https://glm.g-truc.net/0.9.9/index.html
It has classes like
glm::vec3 that map 1-to-1 with OpenGL vectors, and has glm::mat* classes for matrices.
If you're a beginner, figuring out the initial boilerplate and setup of OpenGL can be rough, so be warned, but here's a good tutorial website:
http://www.opengl-tutorial.org/
I don't actually have too much experience in other 3D-graphics libraries (i.e. calling "high level APIs", any major one I guarantee is either built on top of OpenGL or DirectX), but if you don't want to deal directly with OpenGL, you might want to check out libraries listed here:
https://en.wikipedia.org/wiki/List_of_3D_graphics_libraries#High-level_3D_API
Personally, I've heard good things about OpenSceneGraph, OGRE3D, and Irrlicht Engine. But I've only ever used OpenGL itself.
As far as beginner-friendly 2D graphics, I highly suggest SFML. Its design is very straightforward and clean.
https://www.sfml-dev.org/