1

How can I make my background transparent with glcolor even i have enabled GL_BLEND it does not work, I am doing it in native code.Even after passing alfa value to zero it gives me white background, what am I doing wrong, is there is any alternative in gl to make background transparent. This is what I am doing right now for making background transparent.

glEnable(GL_BLEND);
glColor(255,255,255,0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

I'm doing this when combining irrlicht with vuforia, but i'm getting white background.

madhan kumar
  • 1,560
  • 2
  • 26
  • 36

1 Answers1

0

glClear only sets the current buffer that represents the contents of your window to the value you specify, in this case white.

To really see the effect of blending something, you need to do 2 things:

(1) Make the application window transparent (this will be Android/OS specific)

(2) Draw some GL primitive, that will actually blend

EDIT1: Also see, GLSurfaceView - how to make translucent background

Community
  • 1
  • 1
Prabindh
  • 3,356
  • 2
  • 23
  • 25