-1

I am running Mac OSX 10.9.2 natively and tried to run the following C# code: http://pastebin.com/b6GpxjuL

I am using Xamarin Studio with OpenTK to compile the code, but as soon as I start it, I am getting these errors in the console:

[0:] 
[0:] ERROR: 0:2: '' :  version '410' is not supported
ERROR: 0:4: 'layout' : syntax error syntax error


[0:] 
[0:] ERROR: 0:2: '' :  version '410' is not supported

I already tried different versions for the shaders, but I am always getting the error "version XXX is not supported". A render window with a triangle shows up nevertheless, though without the shaders compiled it's not displayed correctly.

I already checked Apple's compatibility list and my machine supports version 4.1 (GeForce 650): https://developer.apple.com/graphicsimaging/opengl/capabilities/

Does anyone know what's wrong?

genpfault
  • 51,148
  • 11
  • 85
  • 139

3 Answers3

2

OpenTK 1.1 is using Carbon, which does not support OpenGL > 2.1. For OpenGL 3.x/4.x you have two options:

  • enable the SDL2 backend by copying libSDL2.dylib from opentk/Dependencies/x86 to your application directory
  • compile the latest development version from github

OpenTK 1.1.2 will support OpenGL 3.x/4.x out of the box. This will be officially released in a few days.

The Fiddler
  • 2,726
  • 22
  • 28
1

I have similar code but use the 'GraphicsContextFlags.ForwardCompatible' which works, along with GraphicsMode.Default. I found that glGetString(GL_VERSION) gave me 4.1 and if I used any context other than this (even say 4.0) it didn’t work.

andrew
  • 27
  • 6
0

What does glGetString(GL_VERSION) and glGetString(GL_SHADING_LANGUAGE_VERSION) say? Actually you should use the GLSL version which the last call will tell you.

Flupp
  • 856
  • 10
  • 24