Programming => General Java Game Development => Topic started by: GoldDiggerTh on January 02, 2018, 20:38:03

Title: Nuklear UI error (glMapBuffer)
Post by: GoldDiggerTh 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
Title: Re: Nuklear UI error (glMapBuffer)
Post by: KaiHH on January 02, 2018, 20:50:31
Also check GL11.glGetError() before and after the glMapBuffer call.