开发者

OpenGL ES OBJ Loading Transparency Issues

Hi I am working on an OBJ loader for use in iOS programming, I have managed to load the vertices and the faces but I have an issue with the transparency of the faces.

For the colours of the vertices I have just made them for now, vary from 0 - 1. So each vertex will gradually change from black to white. The problem is that the white vertices and faces seem to appear over the black ones. The darker the vertices the more they appeared covered.

For an illustration of this see the video I posted here < http://youtu.be/86Sq_NP5jrI > The model here consists of two cubes, one large cube w开发者_如何学Goith a smaller one attached to a corner.


How do you assign a color to vertex? I assume, that you have RGBA render target. So you need to setup color like this:

struct color
{
    u8 r, g, b, a;
};

color newColor;
newColor.a = 255;//opaque vertex, 0 - transparent
//other colors setup
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜