Hello Guest

[solved][newb][LWJGL 2.9.3] Cannot render grid with glDrawElements, GL11.GL_LINE

  • 1 Replies
  • 4241 Views
Hey guys, first post on here, i have been starting to learn OpenGL on java for the past week following ThinMatrix's tutorial on youtube (great work by the way).

Anyway. I started to go quite far by creating a solar system and implementing gravity, all of that using similar code to the ones in his tutorial in which he used the GL_TRIANGLE rendering method.
Only I was unsatisfied about how you could not have a sense of size or speed or position with the single colored background.
I therefore created a method to make the vertices (and indices) for a grid and wanted to render it using GL_LINE but it does not render...
I only get the background color and don't have any error messages so i'm having trouble figuring out what went wrong.

Here is the link to my whole folder (used eclipse) as the project is rather big :
https://drive.google.com/open?id=0B6npgIjioUnpWldmU1RuWWp5cVk

The main.java method works perfectly gravity and camera movement is implemented (wsad+mouse) so have a go at that.

But if anyone figures out what i did wrong it would be appreciated.
I think the error must come from the shaders, the shader programs, or the renderer but i dont know what it is exactly.... ???
So if you have a look, the LineRenderer and LineShader class could be a start.


Thanks in advance guys.

Ps : little teaser of what I did as a picture uploaded  ;)
« Last Edit: July 26, 2016, 16:27:53 by Ownezx »

IT WORKS.....
Turns out GL_LINE is different than GL_LINES

A single damn letter !