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

Author Topic: Segmentation fault  (Read 2543 times)

0 Members and 1 Guest are viewing this topic.

ccbsd

  • Newbie
  • *
  • Posts: 14
    • View Profile
Segmentation fault
« on: September 13, 2011, 05:15:29 pm »
When I use glGenVertexArrays() with sfml 1.6, I suffer from segmentation fault. But when I use glGenVertexArrays() with glfw, everything is ok. I don't know how to solve it.

Disch

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Segmentation fault
« Reply #1 on: September 13, 2011, 09:19:02 pm »
Can you post a small, simple program that reproduces the problem?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Segmentation fault
« Reply #2 on: September 13, 2011, 09:51:26 pm »
This function is defined in GL3 or even 4, so you need:
- a 3.x or 4.x context (which SFML can't create -- but you can get one if you're lucky)
- GLEW or GLEE to handle extensions, as you probably don't have GL3/4 headers and therefore the function is not available directly
Laurent Gomila - SFML developer

ccbsd

  • Newbie
  • *
  • Posts: 14
    • View Profile
Segmentation fault
« Reply #3 on: September 14, 2011, 04:19:38 pm »
Quote from: "Laurent"
This function is defined in GL3 or even 4, so you need:
- a 3.x or 4.x context (which SFML can't create -- but you can get one if you're lucky)
- GLEW or GLEE to handle extensions, as you probably don't have GL3/4 headers and therefore the function is not available directly


It's a pity that SFML can't create GL 3.x/4.x context.  :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Segmentation fault
« Reply #4 on: September 14, 2011, 04:43:23 pm »
SFML 1.6 can't.
SFML 2 can.
Laurent Gomila - SFML developer

ccbsd

  • Newbie
  • *
  • Posts: 14
    • View Profile
Segmentation fault
« Reply #5 on: September 14, 2011, 04:52:36 pm »
Quote from: "Laurent"
SFML 1.6 can't.
SFML 2 can.


I failed to build SFML 2.0 in FreeBSD.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Segmentation fault
« Reply #6 on: September 14, 2011, 05:01:49 pm »
Yup, CMake files need to be patched.
http://www.sfml-dev.org/forum/viewtopic.php?t=5860
Laurent Gomila - SFML developer