#503 fixed
This commit is contained in:
parent
903522de91
commit
2e58f2774c
@ -510,15 +510,18 @@ public class FrameBuffer extends NativeObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The first color buffer attached to this FrameBuffer, or null
|
||||
* @return The color buffer with the index set by {@link #setTargetIndex(int), or null
|
||||
* if no color buffers are attached.
|
||||
* If MRT is disabled, the first color buffer is returned.
|
||||
*/
|
||||
public RenderBuffer getColorBuffer() {
|
||||
if (colorBufs.isEmpty())
|
||||
return null;
|
||||
|
||||
if (colorBufIndex<0 || colorBufIndex>=colorBufs.size()) {
|
||||
return colorBufs.get(0);
|
||||
}
|
||||
return colorBufs.get(colorBufIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The depth buffer attached to this FrameBuffer, or null
|
||||
|
Loading…
x
Reference in New Issue
Block a user