当前位置: 首页>>代码示例>>Java>>正文


Java GLES10.glGetIntegerv方法代码示例

本文整理汇总了Java中android.opengl.GLES10.glGetIntegerv方法的典型用法代码示例。如果您正苦于以下问题:Java GLES10.glGetIntegerv方法的具体用法?Java GLES10.glGetIntegerv怎么用?Java GLES10.glGetIntegerv使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.opengl.GLES10的用法示例。


在下文中一共展示了GLES10.glGetIntegerv方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isETC1Supported

import android.opengl.GLES10; //导入方法依赖的package包/类
/**
 * Check if ETC1 texture compression is supported by the active OpenGL ES context.
 * @return true if the active OpenGL ES context supports ETC1 texture compression.
 */
public static boolean isETC1Supported() {
    int[] results = new int[20];
    GLES10.glGetIntegerv(GLES10.GL_NUM_COMPRESSED_TEXTURE_FORMATS, results, 0);
    int numFormats = results[0];
    if (numFormats > results.length) {
        results = new int[numFormats];
    }
    GLES10.glGetIntegerv(GLES10.GL_COMPRESSED_TEXTURE_FORMATS, results, 0);
    for (int i = 0; i < numFormats; i++) {
        if (results[i] == JavaETC1.ETC1_RGB8_OES) {
            return true;
        }
    }
    return false;
}
 
开发者ID:nicastel,项目名称:renderscript_texture_compressor,代码行数:20,代码来源:JavaETC1Util.java

示例2: isETC1Supported

import android.opengl.GLES10; //导入方法依赖的package包/类
/**
 * Check if ETC1 texture compression is supported by the active OpenGL ES context.
 * @return true if the active OpenGL ES context supports ETC1 texture compression.
 */
public static boolean isETC1Supported() {
    int[] results = new int[20];
    GLES10.glGetIntegerv(GLES10.GL_NUM_COMPRESSED_TEXTURE_FORMATS, results, 0);
    int numFormats = results[0];
    if (numFormats > results.length) {
        results = new int[numFormats];
    }
    GLES10.glGetIntegerv(GLES10.GL_COMPRESSED_TEXTURE_FORMATS, results, 0);
    for (int i = 0; i < numFormats; i++) {
        if (results[i] == RsETC1.ETC1_RGB8_OES) {
            return true;
        }
    }
    return false;
}
 
开发者ID:nicastel,项目名称:renderscript_texture_compressor,代码行数:20,代码来源:RsETC1Util.java

示例3: getSupportedMaxPictureSize

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getSupportedMaxPictureSize() {
	int[] array = new int[1];
	GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, array, 0);
	
	if (array[0] == 0) {
		GLES11.glGetIntegerv(GLES11.GL_MAX_TEXTURE_SIZE, array, 0);
		
		if (array[0] == 0) {
			GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, array, 0);
			
			if (array[0] == 0) {
				GLES30.glGetIntegerv(GLES30.GL_MAX_TEXTURE_SIZE, array, 0);
			}
		}
	}
	
	return array[0] != 0 ? array[0] : 2048;
}
 
开发者ID:PeterCxy,项目名称:BlackLight,代码行数:19,代码来源:Utility.java

示例4: getTextureSize

import android.opengl.GLES10; //导入方法依赖的package包/类
public static final int getTextureSize() {
	if (textureSize > 0) {
		return textureSize;
	}
	
	int[] params = new int[1];
	GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, params, 0);
	textureSize = params[0];
	
	return textureSize;		
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:12,代码来源:SampleSizeUtil.java

示例5: getTextureSize

import android.opengl.GLES10; //导入方法依赖的package包/类
public static final int getTextureSize() {
    if (textureSize > 0) {
        return textureSize;
    }

    int[] params = new int[1];
    GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, params, 0);
    textureSize = params[0];

    return textureSize;
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:12,代码来源:SampleSizeUtil.java

示例6: getMaxSize

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getMaxSize() {
    int maxSize = SIZE_DEFAULT;
    int[] arr = new int[1];
    GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, arr, 0);
    if (arr[0] > 0) {
        maxSize = Math.min(arr[0], SIZE_LIMIT);
    }
    return maxSize;
}
 
开发者ID:jeanboydev,项目名称:Android-CropView,代码行数:10,代码来源:Utils.java

示例7: getBitmapMaxWidthAndMaxHeight

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getBitmapMaxWidthAndMaxHeight() {
    int[] maxSizeArray = new int[1];
    GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);

    if (maxSizeArray[0] == 0) {
        GLES10.glGetIntegerv(GL11.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);
    }
    // return maxSizeArray[0];
    return 2048;
}
 
开发者ID:huijimuhe,项目名称:monolog-android,代码行数:11,代码来源:ImageUtils.java

示例8: getMaxLeftWidthOrHeightImageViewCanRead

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getMaxLeftWidthOrHeightImageViewCanRead(int heightOrWidth) {
	// 1pixel==4bytes
	// http://stackoverflow.com/questions/13536042/android-bitmap-allocating-16-bytes-per-pixel
	// http://stackoverflow.com/questions/15313807/android-maximum-allowed-width-height-of-bitmap
	int[] maxSizeArray = new int[1];
	GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);

	if (maxSizeArray[0] == 0) {
		GLES10.glGetIntegerv(GL11.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);
	}
	int maxHeight = maxSizeArray[0];
	int maxWidth = maxSizeArray[0];

	return (maxHeight * maxWidth) / heightOrWidth;
}
 
开发者ID:lookwhatlook,项目名称:WeiboWeiBaTong,代码行数:16,代码来源:Utility.java

示例9: getBitmapMaxWidthAndMaxHeight

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getBitmapMaxWidthAndMaxHeight() {
	int[] maxSizeArray = new int[1];
	GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);

	if (maxSizeArray[0] == 0) {
		GLES10.glGetIntegerv(GL11.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);
	}
	// return maxSizeArray[0];
	return 2048;
}
 
开发者ID:lookwhatlook,项目名称:WeiboWeiBaTong,代码行数:11,代码来源:Utility.java

示例10: getMaxLeftWidthOrHeightImageViewCanRead

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getMaxLeftWidthOrHeightImageViewCanRead(int heightOrWidth) {
    // 1pixel==4bytes
    // http://stackoverflow.com/questions/13536042/android-bitmap-allocating-16-bytes-per-pixel
    // http://stackoverflow.com/questions/15313807/android-maximum-allowed-width-height-of-bitmap
    int[] maxSizeArray = new int[1];
    GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);

    if (maxSizeArray[0] == 0) {
        GLES10.glGetIntegerv(GL11.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);
    }
    int maxHeight = maxSizeArray[0];
    int maxWidth = maxSizeArray[0];

    return (maxHeight * maxWidth) / heightOrWidth;
}
 
开发者ID:jas0nchen,项目名称:X.Ray,代码行数:16,代码来源:Utility.java

示例11: onActivityResult

import android.opengl.GLES10; //导入方法依赖的package包/类
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data){
    super.onActivityResult(requestCode, resultCode, data);

    //Detects request codes
    if(requestCode==GET_FROM_GALLERY && resultCode == Activity.RESULT_OK) {
        Uri selectedImage = data.getData();
        fileUri = selectedImage;
        System.out.println("FILE URI: " + fileUri);
        Bitmap bitmap = null;
        int[] maxSize = new int[1];
        GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSize, 0);
        try {
            bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);

            //IF IMAGE DIMENSIONS ARE BIGGER THAN SUPPORTED BY OPENGL VERSION ON HARDWARE
            if(bitmap.getHeight()>=maxSize[0]||bitmap.getWidth()>=maxSize[0]){
                DisplayMetrics metrics = new DisplayMetrics();
                getWindowManager().getDefaultDisplay().getMetrics(metrics);
                int width = metrics.widthPixels;
                int height = metrics.heightPixels;
                bitmap = Bitmap.createScaledBitmap(bitmap, width, height, true);
                System.out.println("BITMAP SIZE: "+bitmap.getWidth()+"x"+bitmap.getHeight());
            }
        } catch (IOException e) {
            Log.e(TAG, e.getLocalizedMessage());
        }

        avatarPreview.setImageBitmap(bitmap);
        avatarPreview.setAdjustViewBounds(true);
        System.out.println("IMAGE VIEW SIZE: "+avatarPreview.getWidth()+"x"+avatarPreview.getHeight());
    }
}
 
开发者ID:DiogoPeres,项目名称:WhosUp,代码行数:34,代码来源:UpdateMyProfileActivity.java

示例12: isNeedCloseHardwareAcceleration

import android.opengl.GLES10; //导入方法依赖的package包/类
public boolean isNeedCloseHardwareAcceleration(int w, int h) {
    int[] maxSize = new int[1];
    GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSize, 0);

    if (maxSize[0] < h || maxSize[0] < w) {
        return true;
    }

    return false;
}
 
开发者ID:succlz123,项目名称:S1-Go,代码行数:11,代码来源:MyUtils.java

示例13: getMaxLeftWidthOrHeightImageViewCanRead

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getMaxLeftWidthOrHeightImageViewCanRead(int heightOrWidth) {
    //1pixel==4bytes http://stackoverflow.com/questions/13536042/android-bitmap-allocating-16-bytes-per-pixel
    //http://stackoverflow.com/questions/15313807/android-maximum-allowed-width-height-of-bitmap
    int[] maxSizeArray = new int[1];
    GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);

    if (maxSizeArray[0] == 0) {
        GLES10.glGetIntegerv(GL11.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);
    }
    int maxHeight = maxSizeArray[0];
    int maxWidth = maxSizeArray[0];

    return (maxHeight * maxWidth) / heightOrWidth;
}
 
开发者ID:shawnlinboy,项目名称:siciyuan,代码行数:15,代码来源:Utility.java

示例14: getBitmapMaxWidthAndMaxHeight

import android.opengl.GLES10; //导入方法依赖的package包/类
public static int getBitmapMaxWidthAndMaxHeight() {
        int[] maxSizeArray = new int[1];
        GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);

        if (maxSizeArray[0] == 0) {
            GLES10.glGetIntegerv(GL11.GL_MAX_TEXTURE_SIZE, maxSizeArray, 0);
        }
//        return maxSizeArray[0];
        return 2048;
    }
 
开发者ID:shawnlinboy,项目名称:siciyuan,代码行数:11,代码来源:Utility.java

示例15: getMaxTextureSize

import android.opengl.GLES10; //导入方法依赖的package包/类
private int getMaxTextureSize() {
    int[] maxSize = new int[1];
    GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, maxSize, 0);
    return maxSize[0];
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:ImageCropActivity.java


注:本文中的android.opengl.GLES10.glGetIntegerv方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。