Lines Matching refs:texture

153     // Screen size for when we aren't bound to a texture
173 // Handle indices -- texture
253 // texture.
582 public void drawTexture(BasicTexture texture, int x, int y, int width, int height) {
586 copyTextureCoordinates(texture, mTempSourceRect);
588 convertCoordinate(mTempSourceRect, mTempTargetRect, texture);
589 drawTextureRect(texture, mTempSourceRect, mTempTargetRect);
592 private static void copyTextureCoordinates(BasicTexture texture, RectF outRect) {
595 int right = texture.getWidth();
596 int bottom = texture.getHeight();
597 if (texture.hasBorder()) {
607 public void drawTexture(BasicTexture texture, RectF source, RectF target) {
614 convertCoordinate(mTempSourceRect, mTempTargetRect, texture);
615 drawTextureRect(texture, mTempSourceRect, mTempTargetRect);
619 public void drawTexture(BasicTexture texture, float[] textureTransform, int x, int y, int w,
625 drawTextureRect(texture, textureTransform, mTempTargetRect);
628 private void drawTextureRect(BasicTexture texture, RectF source, RectF target) {
630 drawTextureRect(texture, mTempTextureMatrix, target);
640 // This function changes the source coordinate to the texture coordinates.
642 // bound of the texture.
643 private static void convertCoordinate(RectF source, RectF target, BasicTexture texture) {
644 int width = texture.getWidth();
645 int height = texture.getHeight();
646 int texWidth = texture.getTextureWidth();
647 int texHeight = texture.getTextureHeight();
648 // Convert to texture coordinates
654 // Clip if the rendering range is beyond the bound of the texture.
667 private void drawTextureRect(BasicTexture texture, float[] textureMatrix, RectF target) {
668 ShaderParameter[] params = prepareTexture(texture);
672 if (texture.isFlippedVertically()) {
680 if (texture.isFlippedVertically()) {
686 private ShaderParameter[] prepareTexture(BasicTexture texture) {
689 if (texture.getTarget() == GLES20.GL_TEXTURE_2D) {
696 prepareTexture(texture, program, params);
700 private void prepareTexture(BasicTexture texture, int program, ShaderParameter[] params) {
703 enableBlending(!texture.isOpaque() || getAlpha() < OPAQUE_ALPHA);
706 texture.onBind(this);
707 GLES20.glBindTexture(texture.getTarget(), texture.getId());
716 public void drawMesh(BasicTexture texture, int x, int y, int xyBuffer, int uvBuffer,
718 prepareTexture(texture, mMeshProgram, mMeshParameters);
758 public void drawMixed(BasicTexture texture, int toColor, float ratio, int x, int y, int w, int h) {
759 copyTextureCoordinates(texture, mTempSourceRect);
761 drawMixed(texture, toColor, ratio, mTempSourceRect, mTempTargetRect);
765 public void drawMixed(BasicTexture texture, int toColor, float ratio, RectF source, RectF target) {
776 drawTexture(texture, source, target);
786 public boolean unloadTexture(BasicTexture texture) {
787 boolean unload = texture.isLoaded();
790 mUnboundTextures.add(texture.getId());
834 RawTexture texture = getTargetTexture();
835 setRenderTarget(oldTexture, texture);
840 public void beginRenderTarget(RawTexture texture) {
843 mTargetTextures.add(texture);
844 setRenderTarget(oldTexture, texture);
851 private void setRenderTarget(BasicTexture oldTexture, RawTexture texture) {
852 if (oldTexture == null && texture != null) {
857 } else if (oldTexture != null && texture == null) {
864 if (texture == null) {
867 setSize(texture.getWidth(), texture.getHeight());
869 if (!texture.isLoaded()) {
870 texture.prepare(this);
874 texture.getTarget(), texture.getId(), 0);
904 public void setTextureParameters(BasicTexture texture) {
905 int target = texture.getTarget();
906 GLES20.glBindTexture(target, texture.getId());
915 public void initializeTextureSize(BasicTexture texture, int format, int type) {
916 int target = texture.getTarget();
917 GLES20.glBindTexture(target, texture.getId());
919 int width = texture.getTextureWidth();
920 int height = texture.getTextureHeight();
925 public void initializeTexture(BasicTexture texture, Bitmap bitmap) {
926 int target = texture.getTarget();
927 GLES20.glBindTexture(target, texture.getId());
933 public void texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap,
935 int target = texture.getTarget();
936 GLES20.glBindTexture(target, texture.getId());