Capturing EAGLview content WITH alpha channel on iPhone

前端 未结 1 1927
别跟我提以往
别跟我提以往 2020-12-18 12:59

have been struggling with this issue for quite some time now and couldn\'t find an answer so far. Basically, what I want to do, is capturing the content of my EAGLview and t

相关标签:
1条回答
  • 2020-12-18 13:42

    Two places I can see that you might be losing your transparency:

    1. when you're drawing your scene: does your scene have a transparent background? make sure you're doing a glClear to something like (0,0,0,0) rather than (0,0,0,1).
    2. when you're drawing the image to flip it over: what is the default background color here? Seems likely it's a non-transparent black and you'll end up with that where the transparent parts of your scene used to be.

    You could check if #2 is your problem by saving the image before you flip it over, and if it is, you could avoid the flipping over process by flipping the memory in your pixels buffer directly rather than using Core Graphics calls.

    0 讨论(0)
提交回复
热议问题