I’m trying to render simple lines, for some reason, this code…
while (!glfwWindowShouldClose(window))
{
glfwPollEvents();
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D,TX_RECON);
glUniform1i(TEX_S,0);
glBegin(GL_LINES);
glVertex2f(0,0);
glVertex2f(100,100);
glEnd();
glfwSwapBuffers(window);
}
… doesn’t work.
I can render element buffers fine but I’d rather use glBegin for what I’m planning to do.
Is there some way to fix this? Or are there other ways to render simple lines?