@@ -1811,6 +1811,7 @@ public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst) {
18111811 }
18121812
18131813 @ Override
1814+ @ Deprecated
18141815 public void copyFrameBuffer (FrameBuffer src , FrameBuffer dst , boolean copyDepth ) {
18151816 copyFrameBuffer (src , dst , true , copyDepth );
18161817 }
@@ -2047,7 +2048,7 @@ private void bindFrameBuffer(FrameBuffer fb) {
20472048 }
20482049
20492050 public void updateFrameBuffer (FrameBuffer fb ) {
2050- if (fb .getNumColorBuffers () == 0 && fb .getDepthBuffer () == null ) {
2051+ if (fb .getNumColorTargets () == 0 && fb .getDepthTarget () == null ) {
20512052 throw new IllegalArgumentException ("The framebuffer: " + fb
20522053 + "\n Doesn't have any color/depth buffers" );
20532054 }
@@ -2063,13 +2064,13 @@ public void updateFrameBuffer(FrameBuffer fb) {
20632064
20642065 bindFrameBuffer (fb );
20652066
2066- FrameBuffer .RenderBuffer depthBuf = fb .getDepthBuffer ();
2067+ FrameBuffer .RenderBuffer depthBuf = fb .getDepthTarget ();
20672068 if (depthBuf != null ) {
20682069 updateFrameBufferAttachment (fb , depthBuf );
20692070 }
20702071
2071- for (int i = 0 ; i < fb .getNumColorBuffers (); i ++) {
2072- FrameBuffer .RenderBuffer colorBuf = fb .getColorBuffer (i );
2072+ for (int i = 0 ; i < fb .getNumColorTargets (); i ++) {
2073+ FrameBuffer .RenderBuffer colorBuf = fb .getColorTarget (i );
20732074 updateFrameBufferAttachment (fb , colorBuf );
20742075 }
20752076
@@ -2130,13 +2131,13 @@ public void setReadDrawBuffers(FrameBuffer fb) {
21302131
21312132 if (fb != null ) {
21322133
2133- if (fb .getNumColorBuffers () == 0 ) {
2134+ if (fb .getNumColorTargets () == 0 ) {
21342135 // make sure to select NONE as draw buf
21352136 // no color buffer attached.
21362137 gl2 .glDrawBuffer (GL .GL_NONE );
21372138 gl2 .glReadBuffer (GL .GL_NONE );
21382139 } else {
2139- if (fb .getNumColorBuffers () > limits .get (Limits .FrameBufferAttachments )) {
2140+ if (fb .getNumColorTargets () > limits .get (Limits .FrameBufferAttachments )) {
21402141 throw new RendererException ("Framebuffer has more color "
21412142 + "attachments than are supported"
21422143 + " by the video hardware!" );
@@ -2146,21 +2147,21 @@ public void setReadDrawBuffers(FrameBuffer fb) {
21462147 throw new RendererException ("Multiple render targets "
21472148 + " are not supported by the video hardware" );
21482149 }
2149- if (fb .getNumColorBuffers () > limits .get (Limits .FrameBufferMrtAttachments )) {
2150+ if (fb .getNumColorTargets () > limits .get (Limits .FrameBufferMrtAttachments )) {
21502151 throw new RendererException ("Framebuffer has more"
21512152 + " multi targets than are supported"
21522153 + " by the video hardware!" );
21532154 }
21542155
21552156 intBuf16 .clear ();
2156- for (int i = 0 ; i < fb .getNumColorBuffers (); i ++) {
2157+ for (int i = 0 ; i < fb .getNumColorTargets (); i ++) {
21572158 intBuf16 .put (GLFbo .GL_COLOR_ATTACHMENT0_EXT + i );
21582159 }
21592160
21602161 intBuf16 .flip ();
21612162 glext .glDrawBuffers (intBuf16 );
21622163 } else {
2163- RenderBuffer rb = fb .getColorBuffer (fb .getTargetIndex ());
2164+ RenderBuffer rb = fb .getColorTarget (fb .getTargetIndex ());
21642165 // select this draw buffer
21652166 gl2 .glDrawBuffer (GLFbo .GL_COLOR_ATTACHMENT0_EXT + rb .getSlot ());
21662167 // select this read buffer
@@ -2190,8 +2191,8 @@ public void setFrameBuffer(FrameBuffer fb) {
21902191
21912192 // generate mipmaps for last FB if needed
21922193 if (context .boundFB != null && (context .boundFB .getMipMapsGenerationHint ()!=null ?context .boundFB .getMipMapsGenerationHint ():generateMipmapsForFramebuffers )) {
2193- for (int i = 0 ; i < context .boundFB .getNumColorBuffers (); i ++) {
2194- RenderBuffer rb = context .boundFB .getColorBuffer (i );
2194+ for (int i = 0 ; i < context .boundFB .getNumColorTargets (); i ++) {
2195+ RenderBuffer rb = context .boundFB .getColorTarget (i );
21952196 Texture tex = rb .getTexture ();
21962197 if (tex != null && tex .getMinFilter ().usesMipMapLevels ()) {
21972198 try {
@@ -2239,7 +2240,7 @@ public void readFrameBuffer(FrameBuffer fb, ByteBuffer byteBuf) {
22392240
22402241 private void readFrameBufferWithGLFormat (FrameBuffer fb , ByteBuffer byteBuf , int glFormat , int dataType ) {
22412242 if (fb != null ) {
2242- RenderBuffer rb = fb .getColorBuffer ();
2243+ RenderBuffer rb = fb .getColorTarget ();
22432244 if (rb == null ) {
22442245 throw new IllegalArgumentException ("Specified framebuffer"
22452246 + " does not have a colorbuffer" );
@@ -2274,11 +2275,11 @@ public void deleteFrameBuffer(FrameBuffer fb) {
22742275 context .boundFBO = 0 ;
22752276 }
22762277
2277- if (fb .getDepthBuffer () != null ) {
2278- deleteRenderBuffer (fb , fb .getDepthBuffer ());
2278+ if (fb .getDepthTarget () != null ) {
2279+ deleteRenderBuffer (fb , fb .getDepthTarget ());
22792280 }
2280- if (fb .getColorBuffer () != null ) {
2281- deleteRenderBuffer (fb , fb .getColorBuffer ());
2281+ if (fb .getColorTarget () != null ) {
2282+ deleteRenderBuffer (fb , fb .getColorTarget ());
22822283 }
22832284
22842285 intBuf1 .put (0 , fb .getId ());
0 commit comments