mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Removed last remnants of PowerPC Mac support
This commit is contained in:
parent
66d15dc215
commit
61979f63c1
6 changed files with 5 additions and 42 deletions
|
@ -3,7 +3,6 @@
|
||||||
-- Generation of gl_load.c and gl_load.h files:
|
-- Generation of gl_load.c and gl_load.h files:
|
||||||
-- > lua LoadGen.lua -style=pointer_c -spec=gl -version=3.3 -profile=compatibility -extfile=gl_extlist.txt load
|
-- > lua LoadGen.lua -style=pointer_c -spec=gl -version=3.3 -profile=compatibility -extfile=gl_extlist.txt load
|
||||||
|
|
||||||
APPLE_client_storage
|
|
||||||
ARB_buffer_storage
|
ARB_buffer_storage
|
||||||
ARB_shader_storage_buffer_object
|
ARB_shader_storage_buffer_object
|
||||||
ARB_texture_compression
|
ARB_texture_compression
|
||||||
|
@ -14,4 +13,3 @@ EXT_texture_filter_anisotropic
|
||||||
EXT_texture_sRGB
|
EXT_texture_sRGB
|
||||||
KHR_debug
|
KHR_debug
|
||||||
ARB_invalidate_subdata
|
ARB_invalidate_subdata
|
||||||
EXT_abgr
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ static PROC WinGetProcAddress(const char *name)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ogl_ext_APPLE_client_storage = ogl_LOAD_FAILED;
|
|
||||||
int ogl_ext_ARB_buffer_storage = ogl_LOAD_FAILED;
|
int ogl_ext_ARB_buffer_storage = ogl_LOAD_FAILED;
|
||||||
int ogl_ext_ARB_shader_storage_buffer_object = ogl_LOAD_FAILED;
|
int ogl_ext_ARB_shader_storage_buffer_object = ogl_LOAD_FAILED;
|
||||||
int ogl_ext_ARB_texture_compression = ogl_LOAD_FAILED;
|
int ogl_ext_ARB_texture_compression = ogl_LOAD_FAILED;
|
||||||
|
@ -108,7 +107,6 @@ int ogl_ext_EXT_texture_filter_anisotropic = ogl_LOAD_FAILED;
|
||||||
int ogl_ext_EXT_texture_sRGB = ogl_LOAD_FAILED;
|
int ogl_ext_EXT_texture_sRGB = ogl_LOAD_FAILED;
|
||||||
int ogl_ext_KHR_debug = ogl_LOAD_FAILED;
|
int ogl_ext_KHR_debug = ogl_LOAD_FAILED;
|
||||||
int ogl_ext_ARB_invalidate_subdata = ogl_LOAD_FAILED;
|
int ogl_ext_ARB_invalidate_subdata = ogl_LOAD_FAILED;
|
||||||
int ogl_ext_EXT_abgr = ogl_LOAD_FAILED;
|
|
||||||
|
|
||||||
void (CODEGEN_FUNCPTR *_ptrc_glBufferStorage)(GLenum target, GLsizeiptr size, const void * data, GLbitfield flags) = NULL;
|
void (CODEGEN_FUNCPTR *_ptrc_glBufferStorage)(GLenum target, GLsizeiptr size, const void * data, GLbitfield flags) = NULL;
|
||||||
|
|
||||||
|
@ -2388,8 +2386,7 @@ typedef struct ogl_StrToExtMap_s
|
||||||
PFN_LOADFUNCPOINTERS LoadExtension;
|
PFN_LOADFUNCPOINTERS LoadExtension;
|
||||||
} ogl_StrToExtMap;
|
} ogl_StrToExtMap;
|
||||||
|
|
||||||
static ogl_StrToExtMap ExtensionMap[12] = {
|
static ogl_StrToExtMap ExtensionMap[10] = {
|
||||||
{"GL_APPLE_client_storage", &ogl_ext_APPLE_client_storage, NULL},
|
|
||||||
{"GL_ARB_buffer_storage", &ogl_ext_ARB_buffer_storage, Load_ARB_buffer_storage},
|
{"GL_ARB_buffer_storage", &ogl_ext_ARB_buffer_storage, Load_ARB_buffer_storage},
|
||||||
{"GL_ARB_shader_storage_buffer_object", &ogl_ext_ARB_shader_storage_buffer_object, Load_ARB_shader_storage_buffer_object},
|
{"GL_ARB_shader_storage_buffer_object", &ogl_ext_ARB_shader_storage_buffer_object, Load_ARB_shader_storage_buffer_object},
|
||||||
{"GL_ARB_texture_compression", &ogl_ext_ARB_texture_compression, Load_ARB_texture_compression},
|
{"GL_ARB_texture_compression", &ogl_ext_ARB_texture_compression, Load_ARB_texture_compression},
|
||||||
|
@ -2400,10 +2397,9 @@ static ogl_StrToExtMap ExtensionMap[12] = {
|
||||||
{"GL_EXT_texture_sRGB", &ogl_ext_EXT_texture_sRGB, NULL},
|
{"GL_EXT_texture_sRGB", &ogl_ext_EXT_texture_sRGB, NULL},
|
||||||
{"GL_KHR_debug", &ogl_ext_KHR_debug, Load_KHR_debug},
|
{"GL_KHR_debug", &ogl_ext_KHR_debug, Load_KHR_debug},
|
||||||
{"GL_ARB_invalidate_subdata", &ogl_ext_ARB_invalidate_subdata, Load_ARB_invalidate_subdata},
|
{"GL_ARB_invalidate_subdata", &ogl_ext_ARB_invalidate_subdata, Load_ARB_invalidate_subdata},
|
||||||
{"GL_EXT_abgr", &ogl_ext_EXT_abgr, NULL},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int g_extensionMapSize = 12;
|
static int g_extensionMapSize = 10;
|
||||||
|
|
||||||
static ogl_StrToExtMap *FindExtEntry(const char *extensionName)
|
static ogl_StrToExtMap *FindExtEntry(const char *extensionName)
|
||||||
{
|
{
|
||||||
|
@ -2420,7 +2416,6 @@ static ogl_StrToExtMap *FindExtEntry(const char *extensionName)
|
||||||
|
|
||||||
static void ClearExtensionVars(void)
|
static void ClearExtensionVars(void)
|
||||||
{
|
{
|
||||||
ogl_ext_APPLE_client_storage = ogl_LOAD_FAILED;
|
|
||||||
ogl_ext_ARB_buffer_storage = ogl_LOAD_FAILED;
|
ogl_ext_ARB_buffer_storage = ogl_LOAD_FAILED;
|
||||||
ogl_ext_ARB_shader_storage_buffer_object = ogl_LOAD_FAILED;
|
ogl_ext_ARB_shader_storage_buffer_object = ogl_LOAD_FAILED;
|
||||||
ogl_ext_ARB_texture_compression = ogl_LOAD_FAILED;
|
ogl_ext_ARB_texture_compression = ogl_LOAD_FAILED;
|
||||||
|
@ -2431,7 +2426,6 @@ static void ClearExtensionVars(void)
|
||||||
ogl_ext_EXT_texture_sRGB = ogl_LOAD_FAILED;
|
ogl_ext_EXT_texture_sRGB = ogl_LOAD_FAILED;
|
||||||
ogl_ext_KHR_debug = ogl_LOAD_FAILED;
|
ogl_ext_KHR_debug = ogl_LOAD_FAILED;
|
||||||
ogl_ext_ARB_invalidate_subdata = ogl_LOAD_FAILED;
|
ogl_ext_ARB_invalidate_subdata = ogl_LOAD_FAILED;
|
||||||
ogl_ext_EXT_abgr = ogl_LOAD_FAILED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,6 @@ typedef unsigned int GLhandleARB;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
|
||||||
extern int ogl_ext_APPLE_client_storage;
|
|
||||||
extern int ogl_ext_ARB_buffer_storage;
|
extern int ogl_ext_ARB_buffer_storage;
|
||||||
extern int ogl_ext_ARB_shader_storage_buffer_object;
|
extern int ogl_ext_ARB_shader_storage_buffer_object;
|
||||||
extern int ogl_ext_ARB_texture_compression;
|
extern int ogl_ext_ARB_texture_compression;
|
||||||
|
@ -118,9 +117,6 @@ extern int ogl_ext_EXT_texture_filter_anisotropic;
|
||||||
extern int ogl_ext_EXT_texture_sRGB;
|
extern int ogl_ext_EXT_texture_sRGB;
|
||||||
extern int ogl_ext_KHR_debug;
|
extern int ogl_ext_KHR_debug;
|
||||||
extern int ogl_ext_ARB_invalidate_subdata;
|
extern int ogl_ext_ARB_invalidate_subdata;
|
||||||
extern int ogl_ext_EXT_abgr;
|
|
||||||
|
|
||||||
#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
|
|
||||||
|
|
||||||
#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
|
#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
|
||||||
#define GL_BUFFER_STORAGE_FLAGS 0x8220
|
#define GL_BUFFER_STORAGE_FLAGS 0x8220
|
||||||
|
@ -286,8 +282,6 @@ extern int ogl_ext_EXT_abgr;
|
||||||
#define GL_STACK_UNDERFLOW 0x0504
|
#define GL_STACK_UNDERFLOW 0x0504
|
||||||
#define GL_VERTEX_ARRAY 0x8074
|
#define GL_VERTEX_ARRAY 0x8074
|
||||||
|
|
||||||
#define GL_ABGR_EXT 0x8000
|
|
||||||
|
|
||||||
#define GL_2D 0x0600
|
#define GL_2D 0x0600
|
||||||
#define GL_2_BYTES 0x1407
|
#define GL_2_BYTES 0x1407
|
||||||
#define GL_3D 0x0601
|
#define GL_3D 0x0601
|
||||||
|
|
|
@ -169,10 +169,6 @@ static void I_DetectOS()
|
||||||
"32-bit Intel";
|
"32-bit Intel";
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
"64-bit Intel";
|
"64-bit Intel";
|
||||||
#elif defined __ppc__
|
|
||||||
"32-bit PowerPC";
|
|
||||||
#elif defined __ppc64__
|
|
||||||
"64-bit PowerPC";
|
|
||||||
#else
|
#else
|
||||||
"Unknown";
|
"Unknown";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -112,13 +112,7 @@ EXTERN_CVAR(Bool, ticker )
|
||||||
EXTERN_CVAR(Bool, vid_vsync)
|
EXTERN_CVAR(Bool, vid_vsync)
|
||||||
EXTERN_CVAR(Bool, vid_hidpi)
|
EXTERN_CVAR(Bool, vid_hidpi)
|
||||||
|
|
||||||
#if defined __ppc__ || defined __ppc64__
|
CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
static const bool TRUECOLOR_DEFAULT = false;
|
|
||||||
#else // other than PowerPC
|
|
||||||
static const bool TRUECOLOR_DEFAULT = true;
|
|
||||||
#endif // PowerPC
|
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, swtruecolor, TRUECOLOR_DEFAULT, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
|
||||||
{
|
{
|
||||||
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
||||||
// way to force a CreateFramebuffer call without a lot of refactoring.
|
// way to force a CreateFramebuffer call without a lot of refactoring.
|
||||||
|
@ -892,7 +886,6 @@ CocoaFrameBuffer::CocoaFrameBuffer(int width, int height, bool bgra, bool fullsc
|
||||||
|
|
||||||
glGenTextures(1, &m_texture);
|
glGenTextures(1, &m_texture);
|
||||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, m_texture);
|
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, m_texture);
|
||||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
|
||||||
|
|
||||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
@ -1103,16 +1096,8 @@ void CocoaFrameBuffer::Flip()
|
||||||
rbOpts.dirty = false;
|
rbOpts.dirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __LITTLE_ENDIAN__
|
const GLenum format = IsBgra() ? GL_BGRA : GL_RGBA;
|
||||||
static const GLenum format = GL_RGBA;
|
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, Width, Height, 0, format, GL_UNSIGNED_BYTE, m_pixelBuffer);
|
||||||
#else // __BIG_ENDIAN__
|
|
||||||
static const GLenum format = GL_ABGR_EXT;
|
|
||||||
#endif // __LITTLE_ENDIAN__
|
|
||||||
|
|
||||||
if (IsBgra())
|
|
||||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, Width, Height, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_pixelBuffer);
|
|
||||||
else
|
|
||||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, Width, Height, 0, format, GL_UNSIGNED_BYTE, m_pixelBuffer);
|
|
||||||
|
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
|
@ -381,10 +381,6 @@ static NSString* GetArchitectureString()
|
||||||
return @"i386";
|
return @"i386";
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
return @"x86_64";
|
return @"x86_64";
|
||||||
#elif defined __ppc__
|
|
||||||
return @"ppc";
|
|
||||||
#elif defined __ppc64__
|
|
||||||
return @"ppc64";
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue