0

I must develop some bubbles which will contain some part of main background image. 1 I never use OpenGL ES2. Do you know some book or books which help me understand openGl?

2.How can I do screenshot some background image in OpenGl?

3.How can I set some image in inside of the sphere?

Vit
  • 936
  • 1
  • 10
  • 20

1 Answers1

1

1) Try some example to begin with like GLPaint

2) You can make an UIView screenshot:

+ (UIImage *)imageFromView:(UIView *)view {
    UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0);
    [view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return img;
}

3) You need to generate and load a texture from image. Then create correct vertex coordinates and draw them. Or you can create a fragment shader that does all of that and draw only a square.

Community
  • 1
  • 1
Matic Oblak
  • 16,318
  • 3
  • 24
  • 43