Fix polyvox archive, correct build errors, add additional libraries

This commit is contained in:
Brad Davis 2017-12-12 17:56:17 -08:00
parent 282ae7b6f9
commit 6cff86b0f3
12 changed files with 38 additions and 27 deletions

View file

@ -2,9 +2,9 @@ Please read the [general build guide](BUILD.md) for information on building othe
# Dependencies # Dependencies
*Currently Android building is only supported on 64 bit Linux host environments* Building is currently supported on OSX, Windows and Linux platforms, but developers intending to do work on the library dependencies are strongly urged to use 64 bit Linux as a build platform
You will need the following tools to build our Android targets. You will need the following tools to build Android targets.
* [Gradle](https://gradle.org/install/) * [Gradle](https://gradle.org/install/)
* [Android Studio](https://developer.android.com/studio/index.html) * [Android Studio](https://developer.android.com/studio/index.html)

View file

@ -41,8 +41,10 @@ endif()
if (ANDROID) if (ANDROID)
set(PLATFORM_QT_COMPONENTS AndroidExtras WebView) set(PLATFORM_QT_COMPONENTS AndroidExtras WebView)
set(PLATFORM_GL_BACKEND gpu-gles)
else () else ()
set(PLATFORM_QT_COMPONENTS WebEngine WebEngineWidgets) set(PLATFORM_QT_COMPONENTS WebEngine WebEngineWidgets)
set(PLATFORM_GL_BACKEND gpu-gl)
endif () endif ()
foreach(PLATFORM_QT_COMPONENT ${PLATFORM_QT_COMPONENTS}) foreach(PLATFORM_QT_COMPONENT ${PLATFORM_QT_COMPONENTS})

View file

@ -1,8 +1,26 @@
set(TARGET_NAME native-lib) set(TARGET_NAME native-lib)
setup_hifi_library(Gui Qml Quick) setup_hifi_library(Gui Qml Quick)
link_hifi_libraries(shared networking gl gpu gpu-gles image fbx render-utils physics entities octree audio midi recording controllers script-engine ui)
# Minimal dependencies for testing UI compositing
#link_hifi_libraries(shared networking gl ui) #link_hifi_libraries(shared networking gl ui)
link_hifi_libraries(
shared networking octree
script-engine recording trackers
gl ktx image gpu gpu-gles render render-utils
physics
audio audio-client
ui midi controllers pointers
model model-networking fbx animation
entities entities-renderer
avatars avatars-renderer
ui-plugins input-plugins
# display-plugins
# auto-updater
)
target_link_libraries(native-lib android log m) target_link_libraries(native-lib android log m)
target_opengl() target_opengl()
target_bullet() target_bullet()

View file

@ -89,9 +89,7 @@ int main(int argc, char* argv[])
qFatal("Unable to create primary offscreen context"); qFatal("Unable to create primary offscreen context");
} }
qt_gl_set_global_share_context(sharedCanvas.getContext()); qt_gl_set_global_share_context(sharedCanvas.getContext());
auto globalContext = QOpenGLContext::globalShareContext(); auto globalContext = QOpenGLContext::globalShareContext();
bool threadedGlRendering = QOpenGLContext::supportsThreadedOpenGL();
GLWindow window; GLWindow window;
window.create(); window.create();
@ -104,9 +102,7 @@ int main(int argc, char* argv[])
GLuint fbo = 0; GLuint fbo = 0;
glGenFramebuffers(1, &fbo); glGenFramebuffers(1, &fbo);
static const ivec2 offscreenSize { 640, 480 };
ivec2 offscreenSize { 640, 480 };
OffscreenQmlSurface::setSharedContext(sharedCanvas.getContext()); OffscreenQmlSurface::setSharedContext(sharedCanvas.getContext());
OffscreenQmlSurface* qmlSurface = new OffscreenQmlSurface(); OffscreenQmlSurface* qmlSurface = new OffscreenQmlSurface();

View file

@ -101,7 +101,7 @@ def packages = [
], ],
polyvox: [ polyvox: [
file: 'polyvox_armv8-libcpp.tgz', file: 'polyvox_armv8-libcpp.tgz',
checksum: '5c918288741ee754c16aeb12bb46b9e1', checksum: '349ad5b72aaf2749ca95d847e60c5314',
sharedLibFolder: 'lib', sharedLibFolder: 'lib',
includeLibs: ['Release/libPolyVoxCore.so', 'libPolyVoxUtil.so'], includeLibs: ['Release/libPolyVoxCore.so', 'libPolyVoxUtil.so'],
], ],

View file

@ -201,14 +201,14 @@ endif()
# link required hifi libraries # link required hifi libraries
link_hifi_libraries( link_hifi_libraries(
shared octree ktx gpu gl gpu-gl procedural model render shared octree ktx gpu gl procedural model render
pointers pointers
recording fbx networking model-networking entities avatars trackers recording fbx networking model-networking entities avatars trackers
audio audio-client animation script-engine physics audio audio-client animation script-engine physics
render-utils entities-renderer avatars-renderer ui auto-updater midi render-utils entities-renderer avatars-renderer ui auto-updater midi
controllers plugins image trackers controllers plugins image trackers
ui-plugins display-plugins input-plugins ui-plugins display-plugins input-plugins
${NON_ANDROID_LIBRARIES} ${PLATFORM_GL_BACKEND}
) )
# include the binary directory of render-utils for shader includes # include the binary directory of render-utils for shader includes

View file

@ -1,12 +1,11 @@
set(TARGET_NAME avatars-renderer) set(TARGET_NAME avatars-renderer)
AUTOSCRIBE_SHADER_LIB(gpu model render render-utils) AUTOSCRIBE_SHADER_LIB(gpu model render render-utils)
setup_hifi_library(Widgets Network Script) setup_hifi_library(Widgets Network Script)
link_hifi_libraries(shared gpu model animation model-networking script-engine render image render-utils) link_hifi_libraries(shared gpu model animation model-networking script-engine render render-utils image trackers entities-renderer)
include_hifi_library_headers(avatars) include_hifi_library_headers(avatars)
include_hifi_library_headers(networking) include_hifi_library_headers(networking)
include_hifi_library_headers(fbx) include_hifi_library_headers(fbx)
include_hifi_library_headers(recording) include_hifi_library_headers(recording)
include_hifi_library_headers(trackers)
include_hifi_library_headers(ktx) include_hifi_library_headers(ktx)
include_hifi_library_headers(procedural) include_hifi_library_headers(procedural)
include_hifi_library_headers(physics) include_hifi_library_headers(physics)

View file

@ -1,7 +1,7 @@
set(TARGET_NAME display-plugins) set(TARGET_NAME display-plugins)
AUTOSCRIBE_SHADER_LIB(gpu display-plugins) AUTOSCRIBE_SHADER_LIB(gpu display-plugins)
setup_hifi_library(OpenGL) setup_hifi_library(OpenGL)
link_hifi_libraries(shared plugins ui-plugins gl gpu-gl ui render-utils) link_hifi_libraries(shared plugins ui-plugins gl ui render-utils ${PLATFORM_GL_BACKEND})
include_hifi_library_headers(gpu) include_hifi_library_headers(gpu)
include_hifi_library_headers(model-networking) include_hifi_library_headers(model-networking)
include_hifi_library_headers(networking) include_hifi_library_headers(networking)

View file

@ -15,9 +15,4 @@ include_hifi_library_headers(avatars)
include_hifi_library_headers(controllers) include_hifi_library_headers(controllers)
target_bullet() target_bullet()
target_polyvox()
add_dependency_external_projects(polyvox)
find_package(PolyVox REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${POLYVOX_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES})

View file

@ -12,13 +12,13 @@
#ifndef hifi_EntityTreeRenderer_h #ifndef hifi_EntityTreeRenderer_h
#define hifi_EntityTreeRenderer_h #define hifi_EntityTreeRenderer_h
#include <QSet> #include <QtCore/QSet>
#include <QStack> #include <QtCore/QStack>
#include <QtGui/QMouseEvent>
#include <AbstractAudioInterface.h> #include <AbstractAudioInterface.h>
#include <EntityScriptingInterface.h> // for RayToEntityIntersectionResult #include <EntityScriptingInterface.h> // for RayToEntityIntersectionResult
#include <EntityTree.h> #include <EntityTree.h>
#include <QMouseEvent>
#include <PointerEvent.h> #include <PointerEvent.h>
#include <ScriptCache.h> #include <ScriptCache.h>
#include <TextureCache.h> #include <TextureCache.h>

View file

@ -373,7 +373,7 @@ void EntityRenderer::onAddToScene(const EntityItemPointer& entity) {
renderer->onEntityChanged(_entity->getID()); renderer->onEntityChanged(_entity->getID());
} }
}, Qt::QueuedConnection); }, Qt::QueuedConnection);
_changeHandlerId = entity->registerChangeHandler([this](const EntityItemID& changedEntity) { _changeHandlerId = entity->registerChangeHandler([](const EntityItemID& changedEntity) {
auto renderer = DependencyManager::get<EntityTreeRenderer>(); auto renderer = DependencyManager::get<EntityTreeRenderer>();
if (renderer) { if (renderer) {
renderer->onEntityChanged(changedEntity); renderer->onEntityChanged(changedEntity);

View file

@ -21,9 +21,10 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QString> #include <QtCore/QString>
#include <QtCore/QDateTime>
#include <QtCore/QList>
#include <QtCore/QHash>
#include <QtScript/QScriptable> #include <QtScript/QScriptable>
#include <QList>
#include <QHash>
// Scriptable interface of "console" object. Used exclusively in the JavaScript API // Scriptable interface of "console" object. Used exclusively in the JavaScript API
class ConsoleScriptingInterface : public QObject, protected QScriptable { class ConsoleScriptingInterface : public QObject, protected QScriptable {