PR feedback

This commit is contained in:
Brad Davis 2017-12-21 07:29:29 -08:00
parent c6bc6f6ef2
commit 26291e0a75
6 changed files with 21 additions and 10 deletions

View file

@ -454,6 +454,8 @@ task cleanDependencies(type: Delete) {
delete 'app/src/main/res/values/libs.xml'
}
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
// See the comment on the qtBundle task above
/*
// FIXME derive the path from the gradle environment
def toolchain = [

View file

@ -15,4 +15,4 @@ include_hifi_library_headers(avatars)
include_hifi_library_headers(controllers)
target_bullet()
target_polyvox()
target_polyvox()

View file

@ -15,6 +15,11 @@
#include <QtCore/QtGlobal>
#if defined(Q_OS_ANDROID)
#define HIFI_GLES
#define HIFI_EGL
#endif
#if defined(HIFI_GLES)
// Minimum GL ES version required is 3.2
#define GL_MIN_VERSION_MAJOR 0x03
#define GL_MIN_VERSION_MINOR 0x02
@ -30,9 +35,11 @@
#define MINIMUM_GL_VERSION ((GL_MIN_VERSION_MAJOR << 8) | GL_MIN_VERSION_MINOR)
#if defined(Q_OS_ANDROID)
#if defined(HIFI_GLES)
#include <EGL/egl.h>
#endif
#if defined(HIFI_GLES)
#include <GLES3/gl32.h>
#define GL_DEPTH_COMPONENT32_OES 0x81A7
@ -55,7 +62,7 @@ extern "C" {
extern PFNGLFRAMEBUFFERTEXTUREEXTPROC glFramebufferTextureEXT;
}
#else // !defined(Q_OS_ANDROID)
#else // !defined(HIFI_GLES)
#define GL_GLEXT_PROTOTYPES 1
#include <GL/glew.h>

View file

@ -28,7 +28,7 @@ const QSurfaceFormat& getDefaultOpenGLSurfaceFormat() {
static QSurfaceFormat format;
static std::once_flag once;
std::call_once(once, [] {
#if defined(Q_OS_ANDROID)
#if defined(HIFI_GLES)
format.setRenderableType(QSurfaceFormat::OpenGLES);
format.setRedBufferSize(8);
format.setGreenBufferSize(8);

View file

@ -52,16 +52,15 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
_offscreenSurface->setFormat(_context->format());
_offscreenSurface->create();
// Due to a https://bugreports.qt.io/browse/QTBUG-65125 we can't rely on `isValid`
// to determine if the offscreen surface was successfully created, so we use
// makeCurrent as a proxy test. Bug is fixed in Qt 5.9.4
#if defined(Q_OS_ANDROID)
if (!_context->makeCurrent(_offscreenSurface)) {
qFatal("Unable to make offscreen surface current");
}
#else
// For some reason, the offscreen surface is considered invalid on android
// possibly because of a bad format? Would need to add some logging to the
// eglpbuffer implementation used from the android platform plugin.
// Alternatively investigate the use of an invisible surface view to do
// a 'native' offscreen surface
if (!_offscreenSurface->isValid()) {
qFatal("Offscreen surface is invalid");
}

View file

@ -23,6 +23,7 @@
#include <QtCore/QString>
#include <QtCore/QFileInfo>
// FIXME quazip hasn't been built on the android toolchain
#if !defined(Q_OS_ANDROID)
#include <quazip5/quazip.h>
#include <quazip5/JlCompress.h>
@ -73,6 +74,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool
QStringList FileScriptingInterface::unzipFile(QString path, QString tempDir) {
#if defined(Q_OS_ANDROID)
// FIXME quazip hasn't been built on the android toolchain
return QStringList();
#else
QDir dir(path);
@ -137,6 +139,7 @@ void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName)
return;
}*/
QFileInfoList files;
// FIXME quazip hasn't been built on the android toolchain
#if !defined(Q_OS_ANDROID)
if (file.fileName().contains(".zip")) {
qCDebug(scriptengine) << "Extracting archive: " + file.fileName();