I made an application and i have in it a FrameLayout that implements an OpenGLSurfaceView. What i need to do is to make the SurfaceView take the background from its parent layout (which fills the whole screen). Can i somehow make the SurfaceView background to be transparent so i'd have the picture from the parent layout?
Asked
Active
Viewed 169 times
0
-
1Possible duplicate: [Android, Transparent sub-GLSurfaceView in layout?](http://stackoverflow.com/q/2498494/1262542) – Stefan Hanke Jun 22 '12 at 08:40
-
i did what i found in that post u said its a duplicate. The background is now visible, but i have a problem. I now create a triangle and it is translucent too, (i can see the background throught it). My question is: if I load a texture, would it be translucent too? and if yes, how can i make it not to be? – rosu alin Jun 22 '12 at 11:23
-
Don't know; try playing around with the alpha value you're using. Textures can have alpha, too, so you'd need to set it to `0`. – Stefan Hanke Jun 22 '12 at 12:07
-
Managed it somehow, on the onDrawFrame(GL10 gl) function i did this gl.glColor4f(0.63671875f, 0.76953125f, 0.22265625f, 1.0f); and now it works. First the last variable was 0.0f and changing it to 1.0f made it work :D 10x a lot – rosu alin Jun 25 '12 at 09:07
1 Answers
0
Managed it somehow, on the onDrawFrame(GL10 gl) function i did this gl.glColor4f(0.63671875f, 0.76953125f, 0.22265625f, 1.0f); and now it works. First the last variable was 0.0f and changing it to 1.0f made it work :D 10x a lot

rosu alin
- 5,674
- 11
- 69
- 150