*/
#include "jni.h"
-#include "JNIHelp.h"
+#include <nativehelper/JNIHelp.h>
#include "GraphicsJNI.h"
#include <math.h>
int err = checkFormat(colorType, internalformat, type);
if (err)
return err;
- bitmap.lockPixels();
const int w = bitmap.width();
const int h = bitmap.height();
const void* p = bitmap.getPixels();
glTexImage2D(target, level, internalformat, w, h, border, internalformat, type, p);
}
error:
- bitmap.unlockPixels();
return err;
}
int err = checkFormat(colorType, format, type);
if (err)
return err;
- bitmap.lockPixels();
const int w = bitmap.width();
const int h = bitmap.height();
const void* p = bitmap.getPixels();
glTexSubImage2D(target, level, xoffset, yoffset, w, h, format, type, p);
- bitmap.unlockPixels();
return 0;
}