equal
deleted
inserted
replaced
146 procedure SendKB; |
146 procedure SendKB; |
147 procedure SetLittle(var r: hwFloat); |
147 procedure SetLittle(var r: hwFloat); |
148 procedure SendStat(sit: TStatInfoType; s: shortstring); |
148 procedure SendStat(sit: TStatInfoType; s: shortstring); |
149 function Str2PChar(const s: shortstring): PChar; |
149 function Str2PChar(const s: shortstring): PChar; |
150 function NewTexture(width, height: Longword; buf: Pointer): PTexture; |
150 function NewTexture(width, height: Longword; buf: Pointer): PTexture; |
151 function Surface2Tex(surf: PSDL_Surface): PTexture; |
151 function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture; |
152 procedure FreeTexture(tex: PTexture); |
152 procedure FreeTexture(tex: PTexture); |
153 function toPowerOf2(i: Longword): Longword; |
153 function toPowerOf2(i: Longword): Longword; |
154 function DecodeBase64(s: shortstring): shortstring; |
154 function DecodeBase64(s: shortstring): shortstring; |
155 {$IFNDEF IPHONEOS} |
155 {$IFNDEF IPHONEOS} |
156 procedure MakeScreenshot(s: shortstring); |
156 procedure MakeScreenshot(s: shortstring); |
345 end; |
345 end; |
346 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
346 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
347 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) |
347 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) |
348 end; |
348 end; |
349 |
349 |
350 function Surface2Tex(surf: PSDL_Surface): PTexture; |
350 function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture; |
351 var modeIntFormat: LongInt; |
351 var modeIntFormat: LongInt; |
352 modeFormat: LongInt; |
352 modeFormat: LongInt; |
353 tw, th, x, y: Longword; |
353 tw, th, x, y: Longword; |
354 tmpp: pointer; |
354 tmpp: pointer; |
355 fromP4, toP4: PLongWordArray; |
355 fromP4, toP4: PLongWordArray; |
467 ResetVertexArrays(Surface2Tex); |
467 ResetVertexArrays(Surface2Tex); |
468 |
468 |
469 if SDL_MustLock(surf) then |
469 if SDL_MustLock(surf) then |
470 SDL_UnlockSurface(surf); |
470 SDL_UnlockSurface(surf); |
471 |
471 |
472 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
472 if enableClamp and not cReducedQuality then |
473 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
473 begin |
|
474 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
|
475 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) |
|
476 end; |
474 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
477 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
475 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) |
478 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) |
476 end; |
479 end; |
477 |
480 |
478 procedure FreeTexture(tex: PTexture); |
481 procedure FreeTexture(tex: PTexture); |