Revision 2bd3d0fb
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/main/DistortedLibrary.java | ||
---|---|---|
221 | 221 |
|
222 | 222 |
private static ExceptionListener mListener; |
223 | 223 |
private static Resources mResources; |
224 |
private static int mMaxTextureSize; |
|
224 | 225 |
|
225 | 226 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
226 | 227 |
// private: hide this from Javadoc |
... | ... | |
994 | 995 |
mGLSL = (major==3 && minor==0) ? 300 : 310; |
995 | 996 |
} |
996 | 997 |
|
998 |
int[] maxTextureSize = new int[1]; |
|
999 |
GLES30.glGetIntegerv(GLES30.GL_MAX_TEXTURE_SIZE, maxTextureSize, 0); |
|
1000 |
mMaxTextureSize = maxTextureSize[0]; |
|
1001 |
|
|
997 | 1002 |
android.util.Log.e("DISTORTED", "Using OpenGL ES "+major+"."+minor); |
998 | 1003 |
mGLSL_VERSION = "#version "+mGLSL+" es\n"; |
999 | 1004 |
|
... | ... | |
1086 | 1091 |
mBlitProgram = null; |
1087 | 1092 |
} |
1088 | 1093 |
|
1094 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
1095 |
/** |
|
1096 |
* Return the maximum size of the texture supported by the driver. |
|
1097 |
*/ |
|
1098 |
public static int getMaxTextureSize() |
|
1099 |
{ |
|
1100 |
return mMaxTextureSize; |
|
1101 |
} |
|
1102 |
|
|
1089 | 1103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1090 | 1104 |
/** |
1091 | 1105 |
* Returns the maximum number of effects of a given type that can be simultaneously applied to a |
Also available in: Unified diff
Detect if the texture we are trying to upload is too large and return an error.