Triangles are duplicate when Translucent in OpenGL

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Triangles are duplicate when Translucent in OpenGL

Postby himym » Mon Oct 26, 2009 1:34 pm

Hello,
I have an odd behavior on OpenGL. I am having a GLSurfaceView and since I like to display something under that surface, I was thinking to set my GLSurfaceView to translucent. But when I now want to put one triangle on that surface, there are showing up two triangles. As soon as I dont set that surface to translucent only one triangle is visible ( and this one even shows up on a different color, but that I may understand).
Here is some snippet of my code (it's from the onCreate method):
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.         glView = new GLSurfaceView(this);
  3.  
  4.         glView.setRenderer(new VortexRenderer());
  5.  
  6.         glView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
  7.  
  8.         setContentView(glView);
  9.  
  10.         secondView = new SecondView(this);
  11.  
  12.         addContentView(secondView, new LayoutParams(.......);
  13.  
  14.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4

(The Renderer is drawing the triangle)
So, does anyone have a similar behavor or no how I may solve that problem.
Thanks so much
Regards himym
himym
Developer
Developer
 
Posts: 33
Joined: Sun Oct 18, 2009 9:50 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests