I'm looking for an example of loading a png-file on MonoDroid using OpenTK. Anyone?
Thanks!
Put TexLib into your code and do the following:
Add the following function to the TexLib.cs:
public static int CreateTextureFromStream (InputStream stream)
{
return CreateTextureFromBitmap (new Bitmap (Bitmap.FromStream (stream)));
}
Call the function with your asset:
int textureId = TexUtil.CreateTextureFromStream (Assets.Open ("my_texture.png"));