| 436 | } |
| 437 | |
| 438 | int TextBankGL33::CreateGPUSurface(SurfaceInfoGL33& surface, const TextureDescGL33& desc, PacFormat format, |
| 439 | int totalSize) |
| 440 | { |
| 441 | int ret = surface.CreateSurface(desc, format, totalSize); |
| 442 | if (ret < 0) |
| 443 | { |
| 444 | LOG_DEBUG(Graphics, "GL33: CreateGPUSurface failed, trying ForcedReserveMemory"); |
| 445 | ForcedReserveMemory(totalSize); |
| 446 | ret = surface.CreateSurface(desc, format, totalSize); |
| 447 | if (ret < 0) |
| 448 | { |
| 449 | Poseidon::Foundation::ErrorMessage("GL33: Cannot create texture (%dx%d)", desc.w, desc.h); |
| 450 | return -1; |
| 451 | } |
| 452 | } |
| 453 | _totalAllocated += surface.SizeUsed(); |
| 454 | return 0; |
| 455 | } |
| 456 | |
| 457 | Texture* TextBankGL33::CreateDynamic(int w, int h, const void* rgba, uint32_t size, bool mipmap) |
| 458 | { |
no test coverage detected