Login  Register

Re: Using glPrimitiveRestartIndex to declare multiple geometries in the same VBO

Posted by Martin on Sep 30, 2021; 2:22pm
URL: https://forum.jogamp.org/Using-glPrimitiveRestartIndex-to-declare-multiple-geometries-in-the-same-VBO-tp4041307p4041327.html

I got the explanation for the failure : I am using GL2 core profile. Primitive restart is only supported in core profiles as of OpenGL 3.1. Before 3.1, one should have the NV_primitive_restart extension available, which is not the case on my MacOS 10.12.3.

I indeed get these information

Capabilities  : GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.hw], offscr[fbo]]
GL_VENDOR     : NVIDIA Corporation
GL_RENDERER   : NVIDIA GeForce GT 650M OpenGL Engine
GL_VERSION    : 2.1 NVIDIA-10.17.5 355.10.05.45f01
GL_EXTENSIONS :
        GL_ARB_color_buffer_float
        GL_ARB_depth_buffer_float
        GL_ARB_depth_clamp
        GL_ARB_depth_texture
        GL_ARB_draw_buffers
       ...


If you want to get the same information, use this

GL gl = ...

StringBuffer sb = new StringBuffer();
sb.append("Capabilities  : " + caps + "\n");
sb.append("GL_VENDOR     : " + gl.glGetString(GL.GL_VENDOR) + "\n");
sb.append("GL_RENDERER   : " + gl.glGetString(GL.GL_RENDERER) + "\n");
sb.append("GL_VERSION    : " + gl.glGetString(GL.GL_VERSION) + "\n");

String ext = gl.glGetString(GL.GL_EXTENSIONS);

if(ext!=null) {
  sb.append("GL_EXTENSIONS : " + "\n");
  for(String e: ext.split(" ")) {
    sb.append("\t" + e + "\n");
  }
}


More detailed answers can be found here.