Ooops
April 02, 2020, 10:01:46 AM

Author Topic: Blitz Max NG - OpenGL on Raspian error  (Read 174 times)

Offline Yeshu777

  • Jr. Member
  • **
  • Posts: 4
Blitz Max NG - OpenGL on Raspian error
« on: February 25, 2020, 04:39:53 PM »
Hi all,

Wondering if anyone can help.

I currently have BlitzMax NG running on Raspian Pi.

In the samples ( eg. "digesteroids" ) everything compiles until it gets to the linker - then throws up:

"Compile Error - undefined reference to 'glDisable'"

It would appear the linker cannot find the OpenGL libs - not being a Linux guru I'm not sure the best way to resolve this.

Any advice greatly appreciated
Cymru Am Byth

Offline Derron

  • Hero Member
  • *****
  • Posts: 2818
Re: Blitz Max NG - OpenGL on Raspian error
« Reply #1 on: February 26, 2020, 06:04:43 AM »
I do not have a Raspi ... but it seems you have to enable OpenGL in the driver settings.

raspi-settings - advancded - GL driver.

Edit:
https://raspberrypi.stackexchange.com/questions/75071/running-modern-opengl-on-raspberry-pi

bye
Ron

Offline Brucey

  • Full Member
  • ***
  • Posts: 118
Re: Blitz Max NG - OpenGL on Raspian error
« Reply #2 on: February 26, 2020, 07:00:02 AM »
I'm pondering whether to revert it to use OpenGL ES again - which may be better since ES does tend to have better support than GL.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2818
Re: Blitz Max NG - OpenGL on Raspian error
« Reply #3 on: February 26, 2020, 08:52:13 AM »
If  Raspis default to GLES then yes. If newer RasPIs default to OGL - maybe add a new conditional and default to OGL when targeting "raspi4plus" ?

What benefits exist from using OpenGL on the Raspi?


bye
Ron

Offline Yeshu777

  • Jr. Member
  • **
  • Posts: 4
Re: Blitz Max NG - OpenGL on Raspian error
« Reply #4 on: February 26, 2020, 12:01:40 PM »
Hey All,

Thanks for the feedback - this has certainly been a learning curve for me..

1. I have already used the 'sudo raspi-config' to bring the Pi config tool up -> Advanced settings and selected the Fake KMS OpenGL driver.

2. 'glxgears' shows the OpenGL driver working fine and enabled on the Pi - excellent frame rate by the way.

The problem..

In Blitz Max IDE ( after having rebuilt all modules ) I open starfieldpong sample, using "Framework SDL.gl2sdlmax2d" and hit compile..

All compiles until it comes to the linker... which tells me the following:

/usr/bin/ld: //home/pi/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/gl2sdlmax2d.release.raspberrypi.arm.a(main.bmx.release.raspberrypi.arm.o): in function `_sdl_gl2sdlmax2d_main_TGL2Max2DDriver_Flush':
main.bmx.release.raspberrypi.arm.c:(.text+0x22e4): undefined reference to `glDisable'

The linker does not seem to be pulling in the OpenGL libs / headers / defines..

Any advice appreciated.

Yeshu
Cymru Am Byth

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal