From cbf062e0f808c56c51932a06ae015db764d0e056 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 28 Sep 2008 14:00:53 +0000 Subject: Adding hints to possible endian related problems. No code change, yet. Only suggestions for test. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1420 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/TextGL.pas | 3 +++ src/menu/UDisplay.pas | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/base/TextGL.pas b/src/base/TextGL.pas index 799a0ab8..8569fadf 100644 --- a/src/base/TextGL.pas +++ b/src/base/TextGL.pas @@ -474,6 +474,9 @@ begin glBindTexture(GL_TEXTURE_2D, texture); glTexImage2D(GL_TEXTURE_2D, 0, 4, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, intermediary.pixels); +// on big endian machines (powerpc) this may need to be changed to +// Needs to be tests. KaMiSchi Sept 2008 +// glTexImage2D(GL_TEXTURE_2D, 0, 4, w, h, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, intermediary.pixels); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); diff --git a/src/menu/UDisplay.pas b/src/menu/UDisplay.pas index 0f8344d7..cd8241ae 100644 --- a/src/menu/UDisplay.pas +++ b/src/menu/UDisplay.pas @@ -336,6 +336,10 @@ begin GetMem(ScreenData, RowSize * ScreenH); glReadPixels(0, 0, ScreenW, ScreenH, GL_RGB, GL_UNSIGNED_BYTE, ScreenData); +// on big endian machines (powerpc) this may need to be changed to +// Needs to be tests. KaMiSchi Sept 2008 +// in this case one may have to add " glext, " to the list of used units +// glReadPixels(0, 0, ScreenW, ScreenH, GL_BGR, GL_UNSIGNED_BYTE, ScreenData); Surface := SDL_CreateRGBSurfaceFrom( ScreenData, ScreenW, ScreenH, 24, RowSize, $0000FF, $00FF00, $FF0000, 0); -- cgit v1.2.3