Login  Register

Re: Drawing more than a certain number of triangles at one time/method/stack crash

Posted by Sven Gothel on Dec 15, 2015; 8:50am
URL: https://forum.jogamp.org/Drawing-more-than-a-certain-number-of-triangles-at-one-time-method-stack-crash-tp4035900p4035903.html

On 12/15/2015 12:47 AM, loremipsum [via jogamp] wrote:
> I have a GLJPanel with swing components (JInternalPane renders beautifully on
> top). On render, the parent container/gl event listener (JDesktopPane) calls
> the game's render, which calls the level's render. Inside the level's render,
> I have about 24,000 float vertices waiting to be drawn. Cutting the for loop
> short by a few thousand vertices seems to not crash, but rendering all of them
> does. Other than that, everything seems to work.
>
> SO.. when I go over, I get spammed with this crap (again, Swing DispatchThread
> woes -.-):

It might not be releated to the EDT at all
but to available GPU memory?
We would expect a failure while creating the vertices buffers,
but since you utilize the fixed function pipeline (FFP)
these might get aggregated 'on the fly'.

Try using VBOs and glDraw* commands (as elect recommended)
as see how the memory allocation goes ..

~Sven

>
> Caused by: com.jogamp.opengl.GLException: Error making context 0x20001 current
> on Thread AWT-EventQueue-0, drawableWrite 0xffffffff8c010bb9, drawableRead
> 0xffffffff8c010bb9, werr: -1073282985, WindowsWGLContext [Version 2.1 (Compat
> profile, compat[], FBO, hardware) - 2.1.1 [GL 2.1.0, vendor 0.0.0 (n/a)],
> options 0x4002, this 0x78482bad, handle 0x20001, isShared false,
> jogamp.opengl.gl4.GL4bcImpl@3821b42f,
>          quirks: [NoDoubleBufferedBitmap, NoSurfacelessCtx],
>         Drawable: ResizeableImpl[Initialized true, realized true, texUnit 0,
> samples 0,
>         Factory   jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory@2cbc9673,
>         Handle    0xffffffff8c010bb9,
>         Caps      GLCaps[wgl vid 7 arb: rgba 8/8/8/0, opaque, accum-rgba
> 0/0/0/0, dp/st/ms 16/0/0, one, mono  , hw, GLProfile[GL2/GL2.hw], offscr[fbo]],
>         fboI back 0, front 0, num 1,
>         FBO front read 1, FBO[name r/w 1/1, init true, bound false, size
> 1440x900, samples 0/16, modified false/false, depth RenderAttachment[type
> DEPTH, format 0x81a5, samples 0, 1440x900, name 0x1, obj 0x51a422f6], stencil
> null, colorbuffer attachments: 1/8, with 1 textures: [TextureAttachment[type
> COLOR_TEXTURE, target GL_TEXTURE_2D, level 0, format 0x8051, 1440x900, border
> 0, dataFormat 0x1907, dataType 0x1401; min/mag 0x2600/0x2600, wrap S/T
> 0x812f/0x812f; name 0x1, obj 0x11396ef7], null, null, null, null, null, null,
> null], msaa[null, hasSink false, dirty true], state OK, obj 0x6ef36e59],
>         FBO back  write 1, FBO[name r/w 1/1, init true, bound false, size
> 1440x900, samples 0/16, modified false/false, depth RenderAttachment[type
> DEPTH, format 0x81a5, samples 0, 1440x900, name 0x1, obj 0x51a422f6], stencil
> null, colorbuffer attachments: 1/8, with 1 textures: [TextureAttachment[type
> COLOR_TEXTURE, target GL_TEXTURE_2D, level 0, format 0x8051, 1440x900, border
> 0, dataFormat 0x1907, dataType 0x1401; min/mag 0x2600/0x2600, wrap S/T
> 0x812f/0x812f; name 0x1, obj 0x11396ef7], null, null, null, null, null, null,
> null], msaa[null, hasSink false, dirty true], state OK, obj 0x6ef36e59],
>         Surface   GDISurface[ displayHandle 0x0
> , surfaceHandle 0xffffffff8c010bb9
> , size 1440x900


signature.asc (828 bytes) Download Attachment