Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 4e37411

Browse files
committed
[[ TileCache ]] Disable HardwareBuffer on 32bit armv7 arch
This patch allows armv7 builds to complete successfully until the NDK can be updated to one that includes the required headers (android/hardware_buffer.h).
1 parent a455e32 commit 4e37411

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

engine/src/glhardwarebuffer-android.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ for more details.
1414
You should have received a copy of the GNU General Public License
1515
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1616

17+
/* TODO - Don't attempt to build on 32bit armv7 - needs ndk update */
18+
#if !defined(__arm__)
19+
#define MCANDROIDUSEHARDWAREBUFFER
20+
#endif
21+
22+
#if defined(MCANDROIDUSEHARDWAREBUFFER)
23+
1724
#define GL_GLEXT_PROTOTYPES
1825
#define EGL_EGLEXT_PROTOTYPES
1926
#include <GLES3/gl3.h>
@@ -268,3 +275,44 @@ void MCGLHardwareBufferUnlock(MCGLHardwareBufferRef p_buffer)
268275
MCLog("error unlocking hardwarebuffer: %d", t_error);
269276
p_buffer->lock = nil;
270277
}
278+
279+
#else // defined(MCANDROIDUSEHARDWAREBUFFER)
280+
281+
#include <foundation.h>
282+
#include <GLES3/gl3.h>
283+
#include "glhardwarebuffer.h"
284+
285+
bool MCGLHardwareBufferIsSupported(void)
286+
{
287+
return false;
288+
}
289+
290+
bool MCGLHardwareBufferCreate(uindex_t p_width, uindex_t p_height, MCGLHardwareBufferRef &r_buffer)
291+
{
292+
return false;
293+
}
294+
295+
void MCGLHardwareBufferDestroy(MCGLHardwareBufferRef p_buffer)
296+
{
297+
}
298+
299+
bool MCGLHardwareBufferBindToGLTexture(MCGLHardwareBufferRef p_buffer, GLuint p_texture)
300+
{
301+
return false;
302+
}
303+
304+
bool MCGLHardwareBufferGetStride(MCGLHardwareBufferRef p_buffer, uindex_t &r_stride)
305+
{
306+
return false;
307+
}
308+
309+
bool MCGLHardwareBufferLock(MCGLHardwareBufferRef p_buffer, void *&r_ptr)
310+
{
311+
return false;
312+
}
313+
314+
void MCGLHardwareBufferUnlock(MCGLHardwareBufferRef p_buffer)
315+
{
316+
}
317+
318+
#endif // defined(MCANDROIDUSEHARDWAREBUFFER)

engine/src/tilecachegl3.x.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3737

3838
#elif defined(TARGET_SUBPLATFORM_ANDROID)
3939

40+
/* TODO - Don't attempt to build on 32bit armv7 - needs ndk update */
41+
#if !defined(__arm__)
4042
#define USE_MCGLHARDWAREBUFFER
43+
#endif
4144

4245
#define GL_GLEXT_PROTOTYPES
4346
#define EGL_EGLEXT_PROTOTYPES

0 commit comments

Comments
 (0)