2

How would I initialize glad in a SFML 2.5.1 app? Is there a function or class member to do that? I am following learnopengl's tutorials (but this time with SFML, instead of GLFW)

Edit:

To clarify, I mean that with glad and GLFW, you use gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)

to load the function to load OpenGL. Is there a SFML 2.5.1 function for this, or will I have to write my own?

KapowCabbage
  • 65
  • 1
  • 8

1 Answers1

0

Using SFML 2.5.1 the following worked for me:

gladLoadGLLoader(reinterpret_cast<GLADloadproc>(sf::Context::getFunction))

Some more info here: https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Context.php

Sunbeam
  • 26
  • 3