2017-02-12 138 views
0

我正在使用帶有2個顏色附件的幀緩衝區。我想在一次渲染調用中渲染兩種顏色附件。OpenGL ES多色緩衝區

layout (location = 0) out vec3 _color; 
layout (location = 1) out vec3 _depth; 

_color = texture(_colorImage, coord).xyz; 
_depth = texture(_depthImage, coord).xyz; 

我testet我的電腦的應用程序,但現在我想用在移動應用程序一樣,但我怎麼能在一個以上的附色渲染的OpenGL ES?

首選版本是OpenGL 2.0。但我不需要。

回答

1

對於顏色附件,您不能在OpenGL ES 2.0中渲染多個顏色附件;該API不支持它。

對於OpenGL ES 3.0以上版本,它與OpenGL Multiple Render Targets完全相同。

+0

好的,謝謝。比我必須使用OpenGL ES 3.0。 – Dominick