hedgewars/uStore.pas
changeset 8138 cfb228baa598
parent 8057 93e16240f178
child 8145 6408c0ba4ba1
equal deleted inserted replaced
8136:c2196b1dccb4 8138:cfb228baa598
   435 if not reload then
   435 if not reload then
   436     AddProgress;
   436     AddProgress;
   437 IMG_Quit();
   437 IMG_Quit();
   438 end;
   438 end;
   439 
   439 
   440 {$IF NOT DEFINED(S3D_DISABLED) OR DEFINED(USE_VIDEO_RECORDING)}
   440 {$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)}
   441 procedure CreateFramebuffer(var frame, depth, tex: GLuint);
   441 procedure CreateFramebuffer(var frame, depth, tex: GLuint);
   442 begin
   442 begin
   443     glGenFramebuffersEXT(1, @frame);
   443     glGenFramebuffersEXT(1, @frame);
   444     glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frame);
   444     glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frame);
   445     glGenRenderbuffersEXT(1, @depth);
   445     glGenRenderbuffersEXT(1, @depth);
   537         end;
   537         end;
   538 {$IFDEF USE_VIDEO_RECORDING}
   538 {$IFDEF USE_VIDEO_RECORDING}
   539     if defaultFrame <> 0 then
   539     if defaultFrame <> 0 then
   540         DeleteFramebuffer(defaultFrame, depthv, texv);
   540         DeleteFramebuffer(defaultFrame, depthv, texv);
   541 {$ENDIF}
   541 {$ENDIF}
   542 {$IFNDEF S3D_DISABLED}
   542 {$IFDEF USE_S3D_RENDERING}
   543     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
   543     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
   544         begin
   544         begin
   545         DeleteFramebuffer(framel, depthl, texl);
   545         DeleteFramebuffer(framel, depthl, texl);
   546         DeleteFramebuffer(framer, depthr, texr);
   546         DeleteFramebuffer(framer, depthr, texr);
   547         end
   547         end
   803             AddFileLog('Warning: off-screen rendering is not supported; using back buffer but it may not work.');
   803             AddFileLog('Warning: off-screen rendering is not supported; using back buffer but it may not work.');
   804         end;
   804         end;
   805     end;
   805     end;
   806 {$ENDIF}
   806 {$ENDIF}
   807 
   807 
   808 {$IFNDEF S3D_DISABLED}
   808 {$IFDEF USE_S3D_RENDERING}
   809     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
   809     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then
   810     begin
   810     begin
   811         // prepare left and right frame buffers and associated textures
   811         // prepare left and right frame buffers and associated textures
   812         if glLoadExtension('GL_EXT_framebuffer_object') then
   812         if glLoadExtension('GL_EXT_framebuffer_object') then
   813             begin
   813             begin