KallistiOS / kos-ports

Ported library collection for KallistiOS
Other
52 stars 33 forks source link

No VQ texture format definitions in the new libGL #45

Open nextgeniuspro opened 8 months ago

nextgeniuspro commented 8 months ago

In the description of glCompressedTexImage2DARB there are constants for compressed iternal formats:

/* Loads VQ compressed texture from SH4 RAM into PVR VRAM */
/* internalformat must be one of the following constants:
    GL_UNSIGNED_SHORT_5_6_5_VQ
    GL_UNSIGNED_SHORT_5_6_5_VQ_TWID
    GL_UNSIGNED_SHORT_4_4_4_4_VQ
    GL_UNSIGNED_SHORT_4_4_4_4_VQ_TWID
    GL_UNSIGNED_SHORT_1_5_5_5_VQ
    GL_UNSIGNED_SHORT_1_5_5_5_VQ_TWID
 */

but where these constant defined? In the KGL they were defined in gl.h file

darcagn commented 8 months ago

It may not be implemented.

You'll want to report this upstream to GLdc directly here: https://gitlab.com/simulant/GLdc/-/issues

nextgeniuspro commented 8 months ago

In glkos.h header I found these constants, do they intented to be use instead of those that mentioned in the comment of glCompressedTexImage2DARB function?

/*
 * Dreamcast specific compressed + twiddled formats.
 * We use constants from the range 0xEEE0 onwards
 * to avoid trampling any real GL constants (this is in the middle of the
 * any_vendor_future_use range defined in the GL enum.spec file.
*/
#define GL_UNSIGNED_SHORT_5_6_5_TWID_KOS            0xEEE0
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_TWID_KOS      0xEEE2
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_TWID_KOS      0xEEE3

#define GL_COMPRESSED_RGB_565_VQ_KOS                0xEEE4
#define GL_COMPRESSED_ARGB_1555_VQ_KOS              0xEEE6
#define GL_COMPRESSED_ARGB_4444_VQ_KOS              0xEEE7

#define GL_COMPRESSED_RGB_565_VQ_TWID_KOS           0xEEE8
#define GL_COMPRESSED_ARGB_1555_VQ_TWID_KOS         0xEEEA
#define GL_COMPRESSED_ARGB_4444_VQ_TWID_KOS         0xEEEB

#define GL_COMPRESSED_RGB_565_VQ_MIPMAP_KOS                0xEEEC
#define GL_COMPRESSED_ARGB_1555_VQ_MIPMAP_KOS              0xEEED
#define GL_COMPRESSED_ARGB_4444_VQ_MIPMAP_KOS              0xEEEE

#define GL_COMPRESSED_RGB_565_VQ_MIPMAP_TWID_KOS           0xEEEF
#define GL_COMPRESSED_ARGB_1555_VQ_MIPMAP_TWID_KOS         0xEEF0
#define GL_COMPRESSED_ARGB_4444_VQ_MIPMAP_TWID_KOS         0xEEF1
darcagn commented 8 months ago

tagging @Kazade