d3alek / Texample2

Rendering Text in OpenGL ES 2 on Android
Other
83 stars 33 forks source link

Crashes Visual Studio Emulator for Android #8

Open Myndale opened 6 years ago

Myndale commented 6 years ago

I suspect that this project currently crashes the latest version of the VS Android Emulator (v 1.1.622.2). I've tracked it down to the unbind function in Vertices.java:

public void unbind()  {
    GLES20.glDisableVertexAttribArray(mTextureCoordinateHandle);
}

It would appear that glDisableVertexAttribArray also needs to be called on mMVPIndexHandle, and I'm guessing mPositionHandle probably needs it as well. I haven't seen this on any physical hardware and it only broke on the emulator sometime over the past year.

My apologies for not fixing this myself and submitting a pull-request, I'm not actually set up with Android Studio at the moment and have only seen this in a C#/Xamarin port of the code (although I'd be rather surprised if that was somehow causing it).