Skip to content

Commit

Permalink
Removed last remnants of PowerPC Mac support
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Feb 11, 2018
1 parent 66d15dc commit 61979f6
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 42 deletions.
2 changes: 0 additions & 2 deletions src/gl/system/gl_extlist.txt
Expand Up @@ -3,7 +3,6 @@
-- 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

APPLE_client_storage
ARB_buffer_storage
ARB_shader_storage_buffer_object
ARB_texture_compression
Expand All @@ -14,4 +13,3 @@ EXT_texture_filter_anisotropic
EXT_texture_sRGB
KHR_debug
ARB_invalidate_subdata
EXT_abgr
10 changes: 2 additions & 8 deletions src/gl/system/gl_load.c
Expand Up @@ -97,7 +97,6 @@ static PROC WinGetProcAddress(const char *name)
#endif
#endif

int ogl_ext_APPLE_client_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_texture_compression = ogl_LOAD_FAILED;
Expand All @@ -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_KHR_debug = 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;

Expand Down Expand Up @@ -2388,8 +2386,7 @@ typedef struct ogl_StrToExtMap_s
PFN_LOADFUNCPOINTERS LoadExtension;
} ogl_StrToExtMap;

static ogl_StrToExtMap ExtensionMap[12] = {
{"GL_APPLE_client_storage", &ogl_ext_APPLE_client_storage, NULL},
static ogl_StrToExtMap ExtensionMap[10] = {
{"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_texture_compression", &ogl_ext_ARB_texture_compression, Load_ARB_texture_compression},
Expand All @@ -2400,10 +2397,9 @@ static ogl_StrToExtMap ExtensionMap[12] = {
{"GL_EXT_texture_sRGB", &ogl_ext_EXT_texture_sRGB, NULL},
{"GL_KHR_debug", &ogl_ext_KHR_debug, Load_KHR_debug},
{"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)
{
Expand All @@ -2420,7 +2416,6 @@ static ogl_StrToExtMap *FindExtEntry(const char *extensionName)

static void ClearExtensionVars(void)
{
ogl_ext_APPLE_client_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_texture_compression = ogl_LOAD_FAILED;
Expand All @@ -2431,7 +2426,6 @@ static void ClearExtensionVars(void)
ogl_ext_EXT_texture_sRGB = ogl_LOAD_FAILED;
ogl_ext_KHR_debug = ogl_LOAD_FAILED;
ogl_ext_ARB_invalidate_subdata = ogl_LOAD_FAILED;
ogl_ext_EXT_abgr = ogl_LOAD_FAILED;
}


Expand Down
6 changes: 0 additions & 6 deletions src/gl/system/gl_load.h
Expand Up @@ -107,7 +107,6 @@ typedef unsigned int GLhandleARB;
extern "C" {
#endif /*__cplusplus*/

extern int ogl_ext_APPLE_client_storage;
extern int ogl_ext_ARB_buffer_storage;
extern int ogl_ext_ARB_shader_storage_buffer_object;
extern int ogl_ext_ARB_texture_compression;
Expand All @@ -118,9 +117,6 @@ extern int ogl_ext_EXT_texture_filter_anisotropic;
extern int ogl_ext_EXT_texture_sRGB;
extern int ogl_ext_KHR_debug;
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_STORAGE_FLAGS 0x8220
Expand Down Expand Up @@ -286,8 +282,6 @@ extern int ogl_ext_EXT_abgr;
#define GL_STACK_UNDERFLOW 0x0504
#define GL_VERTEX_ARRAY 0x8074

#define GL_ABGR_EXT 0x8000

#define GL_2D 0x0600
#define GL_2_BYTES 0x1407
#define GL_3D 0x0601
Expand Down
4 changes: 0 additions & 4 deletions src/posix/cocoa/i_main.mm
Expand Up @@ -169,10 +169,6 @@ static void I_DetectOS()
"32-bit Intel";
#elif defined __x86_64__
"64-bit Intel";
#elif defined __ppc__
"32-bit PowerPC";
#elif defined __ppc64__
"64-bit PowerPC";
#else
"Unknown";
#endif
Expand Down
21 changes: 3 additions & 18 deletions src/posix/cocoa/i_video.mm
Expand Up @@ -112,13 +112,7 @@ - (void)enterFullscreenOnZoom
EXTERN_CVAR(Bool, vid_vsync)
EXTERN_CVAR(Bool, vid_hidpi)

#if defined __ppc__ || defined __ppc64__
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)
CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
// 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.
Expand Down Expand Up @@ -892,7 +886,6 @@ - (void)setCursor:(NSCursor*)cursor

glGenTextures(1, &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_MAG_FILTER, GL_NEAREST);
Expand Down Expand Up @@ -1103,16 +1096,8 @@ - (void)setCursor:(NSCursor*)cursor
rbOpts.dirty = false;
}

#ifdef __LITTLE_ENDIAN__
static const GLenum format = GL_RGBA;
#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);
const GLenum format = IsBgra() ? GL_BGRA : GL_RGBA;
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, Width, Height, 0, format, GL_UNSIGNED_BYTE, m_pixelBuffer);

glBegin(GL_QUADS);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
Expand Down
4 changes: 0 additions & 4 deletions src/posix/osx/iwadpicker_cocoa.mm
Expand Up @@ -381,10 +381,6 @@ - (void)menuActionSent:(NSNotification*)notification
return @"i386";
#elif defined __x86_64__
return @"x86_64";
#elif defined __ppc__
return @"ppc";
#elif defined __ppc64__
return @"ppc64";
#endif
}

Expand Down

0 comments on commit 61979f6

Please sign in to comment.