Xamarin Forms and OpenTK

SteeveLEFORTSteeveLEFORT FRMember ✭✭
edited February 2016 in Xamarin.Forms

Hello,

I'm trying to use an OpenGlView in a Xamarin Forms App (PCL) like in documentation : https://developer.xamarin.com/api/type/Xamarin.Forms.OpenGLView/

But, I always get this message : "Error CS0246: The type or namespace name `OpenTK' could not be found. Are you missing an assembly reference?".

Is there a way to use it from commun code ? I can't find any assembly to reference from PCL project.

Posts

  • SteeveLEFORTSteeveLEFORT FRMember ✭✭

    I realize that my question has no sense ... I need some rest :)
    Given example is made for a shared project.
    A PCL project needs exchange through DependencyService.

  • ShannonCaldwellShannonCaldwell USMember
    edited May 2016

    Did you get this to work after fixing your issue?

    I set mine up in a bare-bones shared project for UWP but OpenGLView.OnDisplay is never triggered.

  • SteeveLEFORTSteeveLEFORT FRMember ✭✭

    Hi,

    I finally used a shared projet and it works good for targeted platforms.
    I'm sorry but my needs was for iOS and Android. I didn't try with UWP.

  • FlorinChelaruFlorinChelaru USMember

    Not clear what the solution is here: I am using a PCL Shared project, and trying to add the OpenTK package fails with this error:

    Could not install package 'OpenTK 1.1.2349.61993'. You are trying to install this package into a project that targets 'portable-net45+win+MonoTouch10+MonoAndroid10+xamarinmac20+xamarintvos10+xamarinwatchos10+xamarinios10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

  • FlorinChelaruFlorinChelaru USMember

    Follow-up: I was able to install OpenTK 1.1.2225 but now I get your "Error CS0246: The type or namespace name `OpenTK' could not be found. Are you missing an assembly reference?" How exactly did you solve this problem? Can you please post a code sample?

Sign In or Register to comment.