Mirror image in OpenGl
I am new to OpenGl and needed some help. I have a screen was able to draw a imageon it. Now i want to create a mirror image of the same image i.e i want the screen to be divided in 2 parts(horizontally) and then have the actual image at the bottom and create a duplicate image at the top just like 开发者_如何学Goa mirror image so that if a change is made to the bottom image it reflects on the top image too.
Please give suggestions. (I do not want canvas mirror image code)
try this
sprite = BitmapFactory .decodeResource(appContext.getResources(),R.drawable.spritegfx);
Matrix temp1=new Matrix();
temp1.preScale(-1.0f,1.0f);
flipedSprite = Bitmap.createBitmap(sprite , 0, 0,sprite.getWidth(),sprite .getHeight(), temp1, false);
canvas.drawBitmap(flipedSprite , 0,0, null);
http://www.opengl.org/archives/resources/faq/technical/transformations.htm#tran0170
精彩评论