@@ -1956,6 +1956,7 @@ public void copyFrameBuffer(FrameBuffer src, FrameBuffer dst) {
19561956 }
19571957
19581958 @ Override
1959+ @ Deprecated
19591960 public void copyFrameBuffer (FrameBuffer src , FrameBuffer dst , boolean copyDepth ) {
19601961 copyFrameBuffer (src , dst , true , copyDepth );
19611962 }
@@ -2226,7 +2227,7 @@ private void toggleFramebufferSrgb(FrameBuffer fb) {
22262227 }
22272228
22282229 public void updateFrameBuffer (FrameBuffer fb ) {
2229- if (fb .getNumColorBuffers () == 0 && fb .getDepthBuffer () == null ) {
2230+ if (fb .getNumColorTargets () == 0 && fb .getDepthTarget () == null ) {
22302231 throw new IllegalArgumentException ("The framebuffer: " + fb
22312232 + "\n Doesn't have any color/depth buffers" );
22322233 }
@@ -2242,13 +2243,13 @@ public void updateFrameBuffer(FrameBuffer fb) {
22422243
22432244 bindFrameBuffer (fb );
22442245
2245- FrameBuffer .RenderBuffer depthBuf = fb .getDepthBuffer ();
2246+ FrameBuffer .RenderBuffer depthBuf = fb .getDepthTarget ();
22462247 if (depthBuf != null ) {
22472248 updateFrameBufferAttachment (fb , depthBuf );
22482249 }
22492250
2250- for (int i = 0 ; i < fb .getNumColorBuffers (); i ++) {
2251- FrameBuffer .RenderBuffer colorBuf = fb .getColorBuffer (i );
2251+ for (int i = 0 ; i < fb .getNumColorTargets (); i ++) {
2252+ FrameBuffer .RenderBuffer colorBuf = fb .getColorTarget (i );
22522253 updateFrameBufferAttachment (fb , colorBuf );
22532254 }
22542255
@@ -2309,13 +2310,13 @@ public void setReadDrawBuffers(FrameBuffer fb) {
23092310
23102311 if (fb != null ) {
23112312
2312- if (fb .getNumColorBuffers () == 0 ) {
2313+ if (fb .getNumColorTargets () == 0 ) {
23132314 // make sure to select NONE as draw buf
23142315 // no color buffer attached.
23152316 gl2 .glDrawBuffer (GL .GL_NONE );
23162317 gl2 .glReadBuffer (GL .GL_NONE );
23172318 } else {
2318- if (fb .getNumColorBuffers () > limits .get (Limits .FrameBufferAttachments )) {
2319+ if (fb .getNumColorTargets () > limits .get (Limits .FrameBufferAttachments )) {
23192320 throw new RendererException ("Framebuffer has more color "
23202321 + "attachments than are supported"
23212322 + " by the video hardware!" );
@@ -2325,21 +2326,21 @@ public void setReadDrawBuffers(FrameBuffer fb) {
23252326 throw new RendererException ("Multiple render targets "
23262327 + " are not supported by the video hardware" );
23272328 }
2328- if (fb .getNumColorBuffers () > limits .get (Limits .FrameBufferMrtAttachments )) {
2329+ if (fb .getNumColorTargets () > limits .get (Limits .FrameBufferMrtAttachments )) {
23292330 throw new RendererException ("Framebuffer has more"
23302331 + " multi targets than are supported"
23312332 + " by the video hardware!" );
23322333 }
23332334
23342335 intBuf16 .clear ();
2335- for (int i = 0 ; i < fb .getNumColorBuffers (); i ++) {
2336+ for (int i = 0 ; i < fb .getNumColorTargets (); i ++) {
23362337 intBuf16 .put (GLFbo .GL_COLOR_ATTACHMENT0_EXT + i );
23372338 }
23382339
23392340 intBuf16 .flip ();
23402341 glext .glDrawBuffers (intBuf16 );
23412342 } else {
2342- RenderBuffer rb = fb .getColorBuffer (fb .getTargetIndex ());
2343+ RenderBuffer rb = fb .getColorTarget (fb .getTargetIndex ());
23432344 // select this draw buffer
23442345 gl2 .glDrawBuffer (GLFbo .GL_COLOR_ATTACHMENT0_EXT + rb .getSlot ());
23452346 // select this read buffer
@@ -2373,8 +2374,8 @@ public void setFrameBuffer(FrameBuffer fb) {
23732374 if (boundFB != null && (boundFB .getMipMapsGenerationHint () != null
23742375 ? boundFB .getMipMapsGenerationHint ()
23752376 : generateMipmapsForFramebuffers )) {
2376- for (int i = 0 ; i < boundFB .getNumColorBuffers (); i ++) {
2377- RenderBuffer rb = boundFB .getColorBuffer (i );
2377+ for (int i = 0 ; i < boundFB .getNumColorTargets (); i ++) {
2378+ RenderBuffer rb = boundFB .getColorTarget (i );
23782379 Texture tex = rb .getTexture ();
23792380 if (tex != null && tex .getMinFilter ().usesMipMapLevels ()
23802381 && isMipmapGenerationSupported (tex .getImage ().getFormat (),
@@ -2429,7 +2430,7 @@ public void readFrameBuffer(FrameBuffer fb, ByteBuffer byteBuf) {
24292430
24302431 private void readFrameBufferWithGLFormat (FrameBuffer fb , ByteBuffer byteBuf , int glFormat , int dataType ) {
24312432 if (fb != null ) {
2432- RenderBuffer rb = fb .getColorBuffer ();
2433+ RenderBuffer rb = fb .getColorTarget ();
24332434 if (rb == null ) {
24342435 throw new IllegalArgumentException ("Specified framebuffer"
24352436 + " does not have a colorbuffer" );
@@ -2464,11 +2465,11 @@ public void deleteFrameBuffer(FrameBuffer fb) {
24642465 context .boundFBO = 0 ;
24652466 }
24662467
2467- if (fb .getDepthBuffer () != null ) {
2468- deleteRenderBuffer (fb , fb .getDepthBuffer ());
2468+ if (fb .getDepthTarget () != null ) {
2469+ deleteRenderBuffer (fb , fb .getDepthTarget ());
24692470 }
2470- if (fb .getColorBuffer () != null ) {
2471- deleteRenderBuffer (fb , fb .getColorBuffer ());
2471+ if (fb .getColorTarget () != null ) {
2472+ deleteRenderBuffer (fb , fb .getColorTarget ());
24722473 }
24732474
24742475 intBuf1 .put (0 , fb .getId ());
0 commit comments