Can someone show me how to draw a 3D line in OpenGL within JUCE? I’ve looked through a lot of articles but none seem to even work, perhaps because it is code meant for older OpenGL versions.
All I want to know is how to draw a line from (0, 0, 0) to (1, 1, 1). I have an OpenGL scene set up already.
Its not easy, you pretty much have to learn openGl from ground up. You first have to write a shader program that can draw lines. Which will require the geometry shader, because the lines need to be transformed into a screen space rectangle. Then you need to create vao and a vbo, upload your points, then bind everything and call draw.
I used OpenGL 15 years ago, that was OpenGL 1.4. Shaders just about to come, so everything worked without shaders. So is it no longer possible to do OpenGL graphics without shaders?