equal
deleted
inserted
replaced
473 AddProgress; |
473 AddProgress; |
474 IMG_Quit(); |
474 IMG_Quit(); |
475 |
475 |
476 end; |
476 end; |
477 |
477 |
478 {$IFNDEF PAS2C} |
|
479 {$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)} |
478 {$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)} |
480 procedure CreateFramebuffer(var frame, depth, tex: GLuint); |
479 procedure CreateFramebuffer(var frame, depth, tex: GLuint); |
481 begin |
480 begin |
482 glGenFramebuffersEXT(1, @frame); |
481 glGenFramebuffersEXT(1, @frame); |
483 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frame); |
482 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frame); |
497 begin |
496 begin |
498 glDeleteTextures(1, @tex); |
497 glDeleteTextures(1, @tex); |
499 glDeleteRenderbuffersEXT(1, @depth); |
498 glDeleteRenderbuffersEXT(1, @depth); |
500 glDeleteFramebuffersEXT(1, @frame); |
499 glDeleteFramebuffersEXT(1, @frame); |
501 end; |
500 end; |
502 {$ENDIF} |
|
503 {$ENDIF} |
501 {$ENDIF} |
504 |
502 |
505 procedure StoreRelease(reload: boolean); |
503 procedure StoreRelease(reload: boolean); |
506 var ii: TSprite; |
504 var ii: TSprite; |
507 ai: TAmmoType; |
505 ai: TAmmoType; |
970 |
968 |
971 Tint(255, 255, 255, 255); |
969 Tint(255, 255, 255, 255); |
972 UpdateModelviewProjection; |
970 UpdateModelviewProjection; |
973 {$ENDIF} |
971 {$ENDIF} |
974 |
972 |
975 {$IFNDEF PAS2C} |
|
976 {$IFNDEF USE_S3D_RENDERING} |
973 {$IFNDEF USE_S3D_RENDERING} |
977 if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then |
974 if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then |
978 begin |
975 begin |
979 // prepare left and right frame buffers and associated textures |
976 // prepare left and right frame buffers and associated textures |
980 if glLoadExtension('GL_EXT_framebuffer_object') then |
977 if glLoadExtension('GL_EXT_framebuffer_object') then |
986 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, defaultFrame) |
983 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, defaultFrame) |
987 end |
984 end |
988 else |
985 else |
989 cStereoMode:= smNone; |
986 cStereoMode:= smNone; |
990 end; |
987 end; |
991 {$ENDIF} |
|
992 {$ENDIF} |
988 {$ENDIF} |
993 |
989 |
994 // set view port to whole window |
990 // set view port to whole window |
995 glViewport(0, 0, cScreenWidth, cScreenHeight); |
991 glViewport(0, 0, cScreenWidth, cScreenHeight); |
996 |
992 |