Hello, for my project I need this question answered : How to send data to a GLFW surface to then be displayed ?
You use either OpenGL or Vulkan. OpenGL is easier.
There are a number of tutorials online, if you search for “GLFW OpenGL Tutorial” you should find some.
I tryed but there is so much functions to learn I prefer making everything myself. So its either I know how the surface work or I need to use wingdi.h
You must use with OpenGL or Vulkan with GLFW. You can use either of these to create a surface and then read/write to that with the CPU, but this will be inefficient compared to using the GPU. A slightly better alternative is to write to a texture with the CPU and then draw that to the surface, but this is still far less efficient than using the GPU.
Ok so I won’t use glfw then vulkan is too hard and gl is too slow and still hard
OpenGL is not ‘too slow’, and it remains a decent choice for a beginner. It will certainly be higher performance than drawing with the CPU except under very specific circumstances.