| 47 | } |
| 48 | |
| 49 | static PacFormat DstFormat(PacFormat srcFormat, int dxt) |
| 50 | { |
| 51 | switch (srcFormat) |
| 52 | { |
| 53 | case PacARGB1555: |
| 54 | case PacRGB565: |
| 55 | case PacARGB4444: |
| 56 | return srcFormat; |
| 57 | case PacP8: |
| 58 | return PacARGB1555; |
| 59 | case PacAI88: |
| 60 | if (static_cast<EngineGL33*>(GEngine)->Can88()) |
| 61 | return srcFormat; |
| 62 | if (static_cast<EngineGL33*>(GEngine)->Can8888()) |
| 63 | return PacARGB8888; |
| 64 | return PacARGB4444; |
| 65 | case PacDXT1: |
| 66 | if (static_cast<EngineGL33*>(GEngine)->CanDXT(1)) |
| 67 | return srcFormat; |
| 68 | return PacARGB1555; |
| 69 | default: |
| 70 | LOG_DEBUG(Graphics, "Unsupported source format {}", (int)srcFormat); |
| 71 | return srcFormat; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void InitGLPixelFormat(TextureDescGL33& desc, PacFormat format, bool enableDXT) |
| 76 | { |
no test coverage detected