Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: playing with glad/gl.h : undefined symbol: sf_glad_glGetError  (Read 2143 times)

0 Members and 1 Guest are viewing this topic.

Nafffen

  • Newbie
  • *
  • Posts: 20
    • View Profile
Hey, I am playing a bit with sfml and opengl to learn some stuff. I am trying to use opengl es 2 instead of 1.
I started by regenerating the glad header with the same extentions but with open gl es 2 in addition.
I saw that you added prefix sf_ before almost every symbols and I wondered why ? Was that necessary ?
Also I am getting a linker error on a lot of function pointers. The first one glad_glGetError (I removed "sf_"). I dont really understand as gl.h should be header only and I can't find a big difference with your file.
Can you help me with that ?
Thank you

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: playing with glad/gl.h : undefined symbol: sf_glad_glGetError
« Reply #1 on: June 11, 2024, 09:05:32 pm »
Note that the graphics module isn't compatible with OpenGL ES 2.
You can use ES 2 with the window module, but can't use texture, shader, sprites, etc.

The prefix is there to ensure no symbol conflicts when someone uses their own GLAD headers

You also can't just replace the headers SFML is using. OpenGL ES 2 has done away with the fixed graphics pipeline which SFML is still relying on. As such you'll have to change quite a few things internally to "make it work".

There are a few ports that have more or less hacked something together, for example: https://github.com/Zombieschannel/SFML/tree/GLES2
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nafffen

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: playing with glad/gl.h : undefined symbol: sf_glad_glGetError
« Reply #2 on: June 12, 2024, 04:24:15 pm »
I was not aware of that fork, it helped me a lot ! Thank you

 

anything