Transparent FrameBuffer background in OpenGL

前端 未结 3 1621
执笔经年
执笔经年 2021-02-10 13:53

I want to use glClear and glClearColor to fill a frame buffer with a colour including alpha transparency. However the framebuffer always renders as opaque when binded to a textu

3条回答
  •  名媛妹妹
    2021-02-10 14:27

    If you are trying to make the framebuffer transparent so you can render an object on top of your Desktop, you must know that that's not possible through Glut.

    This kind of effect is specific to the platform you are using. What is it? Linux? Windows? Mac OS X? You'll have to get your hands dirty (drop Glut out of the equation) and understand a little more about building windows.

    By the way, if your target is Windows you should check this:

    (win32) How to make an OpenGL rendering context with transparent background?

提交回复
热议问题