-3

I have recently taken to programming in Java with LWJGL. I have been following a tutorial series on how to make a game engine using this library. However, I have been getting a lot of errors despite the fact that I copied his code exactly, and later used the exact code he typed to troubleshoot. I asked him about it and he said that it was probably because my OpenGl was out of date. Sure enough, when I checked, I discovered that I was running OpenGL 2.1, and needed at least openGl 3.0 to follow his tutorial. When I searched around on how to update my drivers, it said that you needed update your OS X. However, I am currently running the latest version of Mavericks, and have a 2012 retina Macbook Pro. According to this apple help page: http://support.apple.com/kb/HT5942?viewlocale=en_US&locale=en_US

my particular model should be running OpenGL 4.1, not 2.1. How on earth could this have happened, and what do I need to do to update my drivers?

genpfault
  • 51,148
  • 11
  • 85
  • 139
1C0N1C
  • 1
  • 1
    Are you sure you're just not picking the correct OpenGL profile? You may be just getting the default profile. I seriously doubt you need to update any drivers (if it's even possible in OS X). – martinez314 Aug 18 '14 at 19:38
  • In order to see what version of openGL I had, I was instructed to enter System.out.println("OpenGL version: " + GL11.glGetString(GL11.GL_VERSION)); under the code I had to call the display method, and I received OpenGL version: 2.1 NVIDIA-8.26.26 310.40.45f01 In the console. – 1C0N1C Aug 18 '14 at 19:41

1 Answers1

1

On MacOS X you must request a core profile or a forward compatible profile for anything beyond OpenGL-2.1. Most likely you're asking for a compatibility profile which simply isn't supported by MacOS X.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • Noob question: How do you do that? I'm honestly not sure what I was requesting... just taking advice from someone who knew what he was doing. Thanks for answering and I could really use your help. – 1C0N1C Aug 18 '14 at 20:02
  • @1C0N1C: Unfortunately StackOverflow doesn't permit Let-Me-Google-It-For-You links in neither comments nor answers. Anyway: This http://lwjgl.org/wiki/index.php?title=Version_selection was the first hit on Google for the search term "LWJGL core profile". – datenwolf Aug 18 '14 at 20:10
  • This seems to be popular today, I just posted the same link in another question. Here's an earlier answer that shows how to use a 3.x core profile on Mac OS: http://stackoverflow.com/questions/24095931/glut-deprecation-in-mac-osx-10-9-ide-qt-creator. – Reto Koradi Aug 18 '14 at 22:45