Page 1 of 1

OpenGLGadget and AccumulationBuffer IMA

Posted: Thu Feb 05, 2026 10:28 am
by PeDe
PBv6.30, Raspberry Pi OS (arm64, Debian 13, Wayland, P500)

I wanted to try out some examples with OpenGLGadget, and that's when I noticed this error.
I don't know if the abbreviated code is correct, but there is a memory access error with the parameters for AccumulationBuffer.

Peter

Code: Select all

If OpenWindow(0, 50, 50, 400, 300, "OpenGL-Test")
;   If OpenGLGadget(0, 0, 0, 300, 400, #PB_OpenGL_8BitStencilBuffer | #PB_OpenGL_24BitDepthBuffer | #PB_OpenGL_32BitAccumulationBuffer)
  If OpenGLGadget(0, 0, 0, 300, 400, #PB_OpenGL_32BitAccumulationBuffer)
;   If OpenGLGadget(0, 0, 0, 300, 400, #PB_OpenGL_64BitAccumulationBuffer)
;   If OpenGLGadget(0, 0, 0, 400, 300)
      AddWindowTimer(0, 0, 32)
  
      Repeat
       Select WaitWindowEvent()
         Case #PB_Event_Timer
           Select EventTimer()
             Case 0
               SetGadgetAttribute(0, #PB_OpenGL_SetContext, #True) ; [ERROR] Invalid memory access.
               SetGadgetAttribute(0, #PB_OpenGL_FlipBuffers, #True) 
           EndSelect 
         Case #PB_Event_CloseWindow
           Break
      EndSelect
    ForEver
  EndIf
EndIf

Re: OpenGLGadget and AccumulationBuffer IMA

Posted: Thu Feb 05, 2026 11:33 am
by mk-soft
The OpenGLGadget does not all work under Wayland. But it is due to Wayland that there is no suitable interface here.
The same applies to the SysTray (Internal AppIndicator). Other apps also have problems with it.

Solution: Set to X11 with terminal sudo raspi-config.

Re: OpenGLGadget and AccumulationBuffer IMA

Posted: Thu Feb 05, 2026 1:10 pm
by PeDe
The PB example ‘PureBasic-v6.30/examples/sources/OpenGLGadget.pb’ works. With the parameter ‘#PB_OpenGL_32BitAccumulationBuffer’, there is also a memory access error.
You mean that OpenGLGadget only works partially or not at all?

Peter

Re: OpenGLGadget and AccumulationBuffer IMA

Posted: Thu Feb 05, 2026 1:22 pm
by PeDe
Ah, now I understand what you mean. The gadget does not work with the compiler option ‘Enable Wayland support’.

Peter