OpenGLGadget and AccumulationBuffer IMA

Raspberry PI specific forum
PeDe
Enthusiast
Enthusiast
Posts: 343
Joined: Sun Nov 26, 2017 3:13 pm

OpenGLGadget and AccumulationBuffer IMA

Post 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
User avatar
mk-soft
Always Here
Always Here
Posts: 6547
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: OpenGLGadget and AccumulationBuffer IMA

Post 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.
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PeDe
Enthusiast
Enthusiast
Posts: 343
Joined: Sun Nov 26, 2017 3:13 pm

Re: OpenGLGadget and AccumulationBuffer IMA

Post 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
PeDe
Enthusiast
Enthusiast
Posts: 343
Joined: Sun Nov 26, 2017 3:13 pm

Re: OpenGLGadget and AccumulationBuffer IMA

Post by PeDe »

Ah, now I understand what you mean. The gadget does not work with the compiler option ‘Enable Wayland support’.

Peter
Post Reply