android - How to detect if bitmap is too large for texture -


so have done lot of looking around , answer seems to use:

 int[] maxsize = new int[1];  gl.glgetintegerv(gl10.gl_max_texture_size, maxsize, 0); 

to detect size of texture, issue how create or access gl var holds function need? there somewhere? support android 2.2 , above, 4.0+ new trick wont work. if repeat question point me in right direction in comments , take t down. couldn't seem find explanation of how set anywhere, 2 lines of code.

if take on how opengl apps made notice there main app thread (main activity) , renderer class(http://developer.android.com/guide/topics/graphics/opengl.html). heart of renderer class if method public void ondrawframe(gl10 gl) , called android infrastructure when frame needs redraw.

so basically, context object (gl10 gl var) passed renderer (yours) when required , there can check max texture size.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -