glShadeModel equivalent in Xamarin

nick5454nick5454 USUniversity ✭✭✭
edited March 2015 in Xamarin.Android

I have this line of code:
public virtual void OnSurfaceCreated(GL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config) gl.glShadeModel(GL10.GL_SMOOTH); //Enable Smooth Shading

Can anyone tell me where this exists for xamarin, I tried gl., GLES20 and I can't locate the method

I do however see this method in IGL10, I assume I just JavaCast gl to IGL10?

Posts

  • nick5454nick5454 USUniversity ✭✭✭

    To answer my question, I use this cast

    ((IGL11)gl).GlShadeModel (GL10.GlSmooth);

  • nick5454nick5454 USUniversity ✭✭✭

    Although I may need the extension method .JavaCast();

  • nick5454nick5454 USUniversity ✭✭✭

    This ended up being wrong

    public virtual void OnSurfaceCreated(GL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
    gl.glShadeModel(GL10.GL_SMOOTH); //Enable Smooth Shading

    IGL10Ext igl10 = gl.JavaCase();

    is the right way to do it as that cast isn't allowed.

Sign In or Register to comment.