public unsafe void FillTexture(Size size, byte[] rgbaData, bool hasAlpha) { fixed(byte *ptr = &rgbaData[0]) GLCore.TexImage2D(TextureTarget.Texture2D, 0, (int)(hasAlpha ? PixelInternalFormat.Rgba : PixelInternalFormat.Rgb), (int)size.Width, (int)size.Height, 0, (PixelInternalFormat)PixelFormat.Rgba, PixelType.UnsignedByte, (IntPtr)ptr); }
public void LoadTextureInNativePlatformFormat(int width, int height, IntPtr nativeLoadedData, bool hasAlpha) { GLCore.TexImage2D(TextureTarget.Texture2D, 0, (int)(hasAlpha ? PixelInternalFormat.Rgba : PixelInternalFormat.Rgb), width, height, 0, (PixelInternalFormat)(hasAlpha ? PixelFormat.Bgra : PixelFormat.Bgr), PixelType.UnsignedByte, nativeLoadedData); }