0

On my IOS application, I have a screen with 2 views : one classic UIView and one openGLES view. The 3d view is over the 2d and I set a clear background to see the 2d view behind it.

it is displayed as expected on all ios devices but the 3d view is opaque on ios simulator. On the 3DView I use these lines :

[myOpenGLView setBackgroundColor:[UIColor clearColor]];
[myOpenGLView setOpaque:NO];

And before each render I call :

glClearColor(0.,0.,0.,0.);
glClear(GL_COLOR_BUFFER_BIT);

Does anybody got the same problem ?

Klem
  • 529
  • 1
  • 4
  • 18
  • Have you followed all the steps here: http://stackoverflow.com/a/4456862/19679 ? Note that you'll want to work with the CAEAGLLayer that backs your view, not the view itself. – Brad Larson Jan 28 '14 at 19:31

1 Answers1

0

It seems that I can't change the opacity of the eaglLayer.

My opengl view is a singleton, when I initialize it I call

eaglLayer.opaque = YES;

and when I use it for the second time (where I need transparency) I change its value NO but the layer is black on simulator and translucent on iOS devices.

On the other hand if I set the opacity to NO directly, I don't have the bug on simulator

Klem
  • 529
  • 1
  • 4
  • 18