Skip to content
  • Matthew Waters's avatar
    gl/memory: store the internal format as the texture format · 396e04cf
    Matthew Waters authored
    Instead of having special cases at each GL texture creation, upload,
    readback or copy for all non-8-bits-per-components.
    Simply store the more specific format and retrieve the generic
    component/type tuple from that.
    
    Introduce a helper function for retrieving the generic GL format (RGBA,
    RGB, RG, R, L, A) and type (BYTE, SHORT, SHORT_5_6_5) from a sized
    GL format enum (RGBA8, RGB565, RG8, etc).
    396e04cf