I have a problem when trying to run a simple Java code to render a simple triangle using shaders. While in Windows it works nice screenshot, in Linux it isn't displaying anything but a black screen.
I am using Ubuntu 14.10 and Mesa 10.1.3, and lwjgl as the framework.
Here is the code for my main drawing function:
private static void render() {
GL20.glEnableVertexAttribArray(0);
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo);
GL20.glVertexAttribPointer(0, 3, GL11.GL_DOUBLE, false, Vertex.BYTES, 0);
GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, ibo);
GL11.glDrawElements(GL11.GL_TRIANGLES, vertices.size(), GL11.GL_UNSIGNED_INT, 0);
GL20.glDisableVertexAttribArray(0);
}
Here is a full version of the simple code for testing purposes: code.
EDIT: After running the same code various times, one of them draw this, and I haven't been able to replicate it.