equal
deleted
inserted
replaced
17 *) |
17 *) |
18 |
18 |
19 unit uMisc; |
19 unit uMisc; |
20 interface |
20 interface |
21 uses uConsts, SDLh, |
21 uses uConsts, SDLh, |
22 {$IFDEF IPHONE} |
22 {$IFDEF GLES11} |
23 gles11, |
23 gles11, |
24 {$ELSE} |
24 {$ELSE} |
25 GL, |
25 GL, |
26 {$ENDIF} |
26 {$ENDIF} |
27 uFloat; |
27 uFloat; |
505 head[7]:= cScreenHeight; |
505 head[7]:= cScreenHeight; |
506 |
506 |
507 size:= cScreenWidth * cScreenHeight * 3; |
507 size:= cScreenWidth * cScreenHeight * 3; |
508 p:= GetMem(size); |
508 p:= GetMem(size); |
509 |
509 |
510 {$IFDEF IPHONE} |
510 {$IFDEF IPHONEOS} |
511 //since opengl es operates on a single surface GL_FRONT is implied, but how to test that? |
511 //since opengl es operates on a single surface GL_FRONT is implied, but how to test that? |
512 {$ELSE} |
512 {$ELSE} |
513 glReadBuffer(GL_FRONT); |
513 glReadBuffer(GL_FRONT); |
514 {$ENDIF} |
514 {$ENDIF} |
515 glReadPixels(0, 0, cScreenWidth, cScreenHeight, GL_BGR, GL_UNSIGNED_BYTE, p); |
515 glReadPixels(0, 0, cScreenWidth, cScreenHeight, GL_BGR, GL_UNSIGNED_BYTE, p); |