Lines Matching full:bitmap
19 import android.graphics.Bitmap;
36 * return the internal format as defined by OpenGL ES of the supplied bitmap.
37 * @param bitmap
38 * @return the internal format of the bitmap.
40 public static int getInternalFormat(Bitmap bitmap) {
41 if (bitmap == null) {
42 throw new NullPointerException("getInternalFormat can't be used with a null Bitmap");
44 if (bitmap.isRecycled()) {
45 throw new IllegalArgumentException("bitmap is recycled");
47 int result = native_getInternalFormat(bitmap);
55 * Return the type as defined by OpenGL ES of the supplied bitmap, if there
56 * is one. If the bitmap is stored in a compressed format, it may not have
58 * @throws IllegalArgumentException if the bitmap does not have a type.
59 * @param bitmap
60 * @return the OpenGL ES type of the bitmap.
62 public static int getType(Bitmap bitmap) {
63 if (bitmap == null) {
64 throw new NullPointerException("getType can't be used with a null Bitmap");
66 if (bitmap.isRecycled()) {
67 throw new IllegalArgumentException("bitmap is recycled");
69 int result = native_getType(bitmap);
81 * Unlike glTexImage2D() bitmap cannot be null and will raise an exception
86 * sure to set it properly according to the supplied bitmap.
88 * Whether or not bitmap can have non power of two dimensions depends on
95 * @param bitmap
99 Bitmap bitmap, int border) {
100 if (bitmap == null) {
101 throw new NullPointerException("texImage2D can't be used with a null Bitmap");
103 if (bitmap.isRecycled()) {
104 throw new IllegalArgumentException("bitmap is recycled");
106 if (native_texImage2D(target, level, internalformat, bitmap, -1, border)!=0) {
107 throw new IllegalArgumentException("invalid Bitmap format");
114 * internalformat of the bitmap must be compatible with the specified
120 * @param bitmap
125 Bitmap bitmap, int type, int border) {
126 if (bitmap == null) {
127 throw new NullPointerException("texImage2D can't be used with a null Bitmap");
129 if (bitmap.isRecycled()) {
130 throw new IllegalArgumentException("bitmap is recycled");
132 if (native_texImage2D(target, level, internalformat, bitmap, type, border)!=0) {
133 throw new IllegalArgumentException("invalid Bitmap format");
143 * @param bitmap
146 public static void texImage2D(int target, int level, Bitmap bitmap,
148 if (bitmap == null) {
149 throw new NullPointerException("texImage2D can't be used with a null Bitmap");
151 if (bitmap.isRecycled()) {
152 throw new IllegalArgumentException("bitmap is recycled");
154 if (native_texImage2D(target, level, -1, bitmap, -1, border)!=0) {
155 throw new IllegalArgumentException("invalid Bitmap format");
164 * Unlike glTexSubImage2D() bitmap cannot be null and will raise an exception
169 * sure to set it properly according to the supplied bitmap.
171 * Whether or not bitmap can have non power of two dimensions depends on
179 * @param bitmap
182 Bitmap bitmap) {
183 if (bitmap == null) {
184 throw new NullPointerException("texSubImage2D can't be used with a null Bitmap");
186 if (bitmap.isRecycled()) {
187 throw new IllegalArgumentException("bitmap is recycled");
189 int type = getType(bitmap);
190 if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, -1, type)!=0) {
191 throw new IllegalArgumentException("invalid Bitmap format");
203 * @param bitmap
207 Bitmap bitmap, int format, int type) {
208 if (bitmap == null) {
209 throw new NullPointerException("texSubImage2D can't be used with a null Bitmap");
211 if (bitmap.isRecycled()) {
212 throw new IllegalArgumentException("bitmap is recycled");
214 if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, format, type)!=0) {
215 throw new IllegalArgumentException("invalid Bitmap format");
264 native private static int native_getInternalFormat(Bitmap bitmap);
265 native private static int native_getType(Bitmap bitmap);
267 Bitmap bitmap, int type, int border);
269 Bitmap bitmap, int format, int type);