Hello Guest

Nuklear UI error (glMapBuffer)

  • 1 Replies
  • 4771 Views
Nuklear UI error (glMapBuffer)
« on: January 02, 2018, 20:38:03 »
So im realy excited to use nuklear and so i tried the demo and got it working in eclipse.
But when i tried to put it in my small engine it created an error in:
Code: [Select]
                nk_buffer_init_fixed(vbuf, vertices/*, max_vertex_buffer*/);
because vertices is null.
and where vertices is being set is:
Code: [Select]
  // load draw vertices & elements directly into vertex + element buffer
            ByteBuffer vertices = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY, max_vertex_buffer, null);

so i was wondering if anyone would know a reason why glMapBuffer would return null.
while max_vertex_buffer is 524288.

and other nuklear tutorials would be usefull too
cause the lwjgl demo was realy big and quite conffusing.

thanks any help

*

Offline KaiHH

  • ****
  • 334
Re: Nuklear UI error (glMapBuffer)
« Reply #1 on: January 02, 2018, 20:50:31 »
https://www.opengl.org/discussion_boards/showthread.php/155389-glMapBuffer%28%29-returns-NULL
Also check GL11.glGetError() before and after the glMapBuffer call.