1
我無法在我的Android應用中使用glDrawTextOES
繪製紋理。我已經試過SpriteMethodTest代碼,我無法得到它的工作...無法使用glDrawTexfOES繪製
但是,下面的代碼:
代碼加載紋理時裁剪:
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
int[] mCropWorkspace = new int[4];
mCropWorkspace[0] = 0;
mCropWorkspace[1] = bitmap.getHeight();
mCropWorkspace[2] = bitmap.getWidth();
mCropWorkspace[3] = -bitmap.getHeight();
bitmap.recycle();
((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D,
GL11Ext.GL_TEXTURE_CROP_RECT_OES, mCropWorkspace, 0);
代碼繪製:
gl.glBindTexture(GL10.GL_TEXTURE_2D, texture);
((GL11Ext) gl).glDrawTexfOES(x, y, 0.0f, width, height);
任何想法?我得到它與頂點陣列和頂點緩衝區對象,但不是與此...
在此先感謝!