- Home /
OpenGL function don't work well on Unity 2017.2.0f3, But worked well on Unity 2017.1.1f1
Hello, I'm in trouble.
OpenGL function don't work on Unity 2017.2.0f3. But same function did work well on Unity 2017.1.1f1.
For Example: texture value is always zero in this code.
gLSurfaceView.queueEvent(new Runnable() {
@Override
public void run() {
final int[] textures = new int[1];
GLES30.glGenTextures(1, textures, DEFAULT_OFFSET);
Bitmap bitmap = Bitmap.createBitmap(512, 512, Bitmap.Config.ARGB_8888);
final int texture = textures[FIRST_INDEX];
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, texture);
GLUtils.texImage2D(GLES30.GL_TEXTURE_2D, 0, bitmap, 0);
GLES30.glTexParameterf(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_NEAREST);
GLES30.glTexParameterf(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_LINEAR);
Log.i("oges", "tex name : "+texture);
}
});
What do you think is the cause?
Comment