CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/GPU/GeConstants.cpp
Views: 1401
#include "GPU/ge_constants.h"12const char *GeBufferFormatToString(GEBufferFormat fmt) {3switch (fmt) {4case GE_FORMAT_4444: return "4444";5case GE_FORMAT_5551: return "5551";6case GE_FORMAT_565: return "565";7case GE_FORMAT_8888: return "8888";8case GE_FORMAT_DEPTH16: return "DEPTH16";9default: return "N/A";10}11}1213const char *GEPaletteFormatToString(GEPaletteFormat pfmt) {14switch (pfmt) {15case GE_CMODE_16BIT_BGR5650: return "565";16case GE_CMODE_16BIT_ABGR5551: return "5551";17case GE_CMODE_16BIT_ABGR4444: return "4444";18case GE_CMODE_32BIT_ABGR8888: return "8888";19default: return "N/A";20}21}2223const char *GeTextureFormatToString(GETextureFormat fmt) {24switch (fmt) {25case GE_TFMT_5650: return "565";26case GE_TFMT_5551: return "5551";27case GE_TFMT_4444: return "4444";28case GE_TFMT_8888: return "8888";29case GE_TFMT_CLUT4: return "CLUT4";30case GE_TFMT_CLUT8: return "CLUT8";31case GE_TFMT_CLUT16: return "CLUT16";32case GE_TFMT_CLUT32: return "CLUT32";33case GE_TFMT_DXT1: return "DXT1";34case GE_TFMT_DXT3: return "DXT3";35case GE_TFMT_DXT5: return "DXT5";36default: return "N/A";37}38}3940const char *GeTextureFormatToString(GETextureFormat tfmt, GEPaletteFormat pfmt) {41switch (tfmt) {42case GE_TFMT_CLUT4:43switch (pfmt) {44case GE_CMODE_16BIT_BGR5650: return "CLUT4_565";45case GE_CMODE_16BIT_ABGR5551: return "CLUT4_5551";46case GE_CMODE_16BIT_ABGR4444: return "CLUT4_4444";47case GE_CMODE_32BIT_ABGR8888: return "CLUT4_8888";48default: return "N/A";49}50case GE_TFMT_CLUT8:51switch (pfmt) {52case GE_CMODE_16BIT_BGR5650: return "CLUT8_565";53case GE_CMODE_16BIT_ABGR5551: return "CLUT8_5551";54case GE_CMODE_16BIT_ABGR4444: return "CLUT8_4444";55case GE_CMODE_32BIT_ABGR8888: return "CLUT8_8888";56default: return "N/A";57}58case GE_TFMT_CLUT16:59switch (pfmt) {60case GE_CMODE_16BIT_BGR5650: return "CLUT16_565";61case GE_CMODE_16BIT_ABGR5551: return "CLUT16_5551";62case GE_CMODE_16BIT_ABGR4444: return "CLUT16_4444";63case GE_CMODE_32BIT_ABGR8888: return "CLUT16_8888";64default: return "N/A";65}66case GE_TFMT_CLUT32:67switch (pfmt) {68case GE_CMODE_16BIT_BGR5650: return "CLUT32_565";69case GE_CMODE_16BIT_ABGR5551: return "CLUT32_5551";70case GE_CMODE_16BIT_ABGR4444: return "CLUT32_4444";71case GE_CMODE_32BIT_ABGR8888: return "CLUT32_8888";72default: return "N/A";73}74default: return GeTextureFormatToString(tfmt);75}76}777879