maroci's picture

Is this thing actually supposed to work on a Mac?

Is OpenTK actually supposed to work on a Mac? Because out of the box on my MacBook Pro running Lion, about half the example programs completely fail.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
maroci's picture

For example, running OpenAL diagnostics:

---- DEBUG ASSERTION FAILED ----
---- Assert Short Message ----
at System.Diagnostics.TraceImpl.Assert(Boolean condition) in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Diagnostics/TraceImpl.cs:line 219
at System.Diagnostics.Trace.Assert(Boolean condition) in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System/System.Diagnostics/Trace.cs:line 88
at Examples.EfxDiagnostic..ctor() in /Users/mark/Projects/opentk/Source/Examples/OpenAL/Test/OpenALDiagnostics.cs:line 357
at Examples.OpenALDiagnostics.Main() in /Users/mark/Projects/opentk/Source/Examples/OpenAL/Test/OpenALDiagnostics.cs:line 87
at System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod , System.Object , System.Object[] , System.Exception ByRef )
at System.Reflection.MonoMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Reflection/MonoMethod.cs:line 226
at System.Reflection.MethodBase.Invoke(System.Object obj, System.Object[] parameters) in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Reflection/MethodBase.cs:line 96
at Examples.ExampleBrowser+c__AnonStorey1.<>m__0() in /Users/mark/Projects/opentk/Source/Examples/ExampleBrowser.cs:line 378
at System.Threading.Thread.StartInternal() in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading/Thread.cs:line 703
---- Assert Long Message ----

maroci's picture

The "Parrot" example doesn't throw an error, but just comes up with a dialog box with some empty controls you can't do anything with.

maroci's picture

The "reverb" example does nothing but throw this and bring up another dead dialog box.

Launching sample: "EFX: Reverb"

Enumerating audio devices.
Found playback devices:
Built-in Output
Default playback device: Built-in Output
Found recording devices:
Built-in Input
Default recording device: Built-in Input
Data/Audio/the_ring_that_fell.wav: Testing WaveReader({0}).ReadToEnd()
EFX Extension (ALC_EXT_EFX) is not supported(AudioContext: Built-in Output (handle: 27, device: 26)).

maroci's picture

Some of the OpenGL 2.0 examples seem to work, but the swizzled parallax mapping does nothing and logs this:

Creating GraphicsContext.
Created dummy graphics mode.
GraphicsMode: Index: 1, Color: 32 (8888), Depth: 16, Stencil: 0, Samples: 0, Accum: 0 (0000), Buffers: 2, Stereo: False
IWindowInfo: MacOS.CarbonWindowInfo: Handle 4454032
GraphicsContextFlags: Default
Requested version: 1.0
Context Type:
Window info: MacOS.CarbonWindowInfo: Handle 4454032
No context sharing will take place.
AGL pixel format attributes:
AGL_RGBA
AGL_DOUBLEBUFFER
AGL_RED_SIZE : 8
AGL_GREEN_SIZE : 8
AGL_BLUE_SIZE : 8
AGL_ALPHA_SIZE : 8
AGL_DEPTH_SIZE : 16
AGL_FULLSCREEN
AGL_NONE
Attribute array: 4 5 8 8 9 8 10 8 11 8 12 16 54 0
Creating AGL context. Sharing with 0
IsControl: False
context: 53655040
Loading extensions for OpenTK.Graphics.OpenGL.GL... 1900 extensions loaded in 184.3467 ms.
Setting window title: 4454032, CFstring : 167245584, Text : OpenTK | OpenGL 2147483647: Swizzled Parallax Mapping
16 TMU's for Fragment Shaders found. (2 required)
60 varying floats between VS and FS allowed. (6 required)
4096 uniform components allowed in Vertex Shader. (6 required)
4096 uniform components allowed in Fragment Shader. (11 required)

Vertex Shader compiled without complaint.
Fragment Shader failed!
Log:
ERROR: 0:57: 'premature EOF' : syntax error syntax error

Linking Program (3) FAILED!
Program Log:
ERROR: One or more attached shaders not successfully compiled

Program registered 0 Attributes. (Should be 4: Pos, UV, Normal, Tangent)
Disposing context 53655040.
Disposing of AGL context.
Destroying context
Context destruction completed successfully.
Disposing of CarbonGLNative window.
Disposing window 4454032.
The application was terminated by a signal: SIGKILL

maroci's picture

The "picking" example does nothing, though it doesn't log any errors either.

maroci's picture

Numerous other examples fail in other ways. I'd say well under half of them do anything at all.

Inertia's picture

Thanks for the report, It would be easier to locate the problem when
a) you paste the full log of the OpenALDiagnostic output (to see what worked) and
b) be more verbose about your hardware/Drivers installed.

My guess is, that your OpenAL Driver is just OpenAL 1.0 and does not Support the Extensions introduced with OpenAL 1.1, IIRC that's Efx and Recording which both failed for you. (installing OpenAL Soft Driver will fix this)

Regarding the parallax example, it seems that the Fragment shader compile fails either because the Driver cannot compile the shader or the file on disk is corrupt.

I'm aware that the error checking in the examples is minimalistic and suboptimal, because their main intent is showing off some technique or effect and proper error checking with fallbacks, Dialog boxes, etc. would bloat the examples.

AndyKorth's picture

I have posted a fix for the swizzled parallax mapping example here:

http://www.opentk.com/node/3186