mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:34:07 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into render_voxels_optimization
This commit is contained in:
commit
b9a023af37
5 changed files with 59 additions and 8 deletions
|
@ -144,6 +144,8 @@ int main(int argc, const char* argv[]) {
|
|||
float weakChannelAmplitudeRatio = 1.f;
|
||||
|
||||
if (otherAgent != agent) {
|
||||
printf("DEBUG: The bearing for this agent is %f\n", agentRingBuffer->getBearing());
|
||||
|
||||
Position agentPosition = agentRingBuffer->getPosition();
|
||||
Position otherAgentPosition = otherAgentBuffer->getPosition();
|
||||
|
||||
|
|
|
@ -54,6 +54,12 @@ if (APPLE)
|
|||
SET(INTERFACE_SRCS ${INTERFACE_SRCS} ${INTERFACE_RSRCS})
|
||||
endif (APPLE)
|
||||
|
||||
find_package(Qt4 REQUIRED QtCore QtGui)
|
||||
include(${QT_USE_FILE})
|
||||
|
||||
# run qt moc on qt-enabled headers
|
||||
qt4_wrap_cpp(INTERFACE_SRCS src/Application.h)
|
||||
|
||||
# create the executable, make it a bundle on OS X
|
||||
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS})
|
||||
|
||||
|
@ -77,8 +83,6 @@ include_directories(
|
|||
${LODEPNG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_package(Qt4 REQUIRED QtCore QtGui)
|
||||
include(${QT_USE_FILE})
|
||||
target_link_libraries(${TARGET_NAME} ${QT_LIBRARIES})
|
||||
|
||||
if (NOT APPLE)
|
||||
|
|
22
interface/src/Application.cpp
Normal file
22
interface/src/Application.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// Application.cpp
|
||||
// interface
|
||||
//
|
||||
// Created by Andrzej Kapolka on 5/10/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
|
||||
#include <QMenuBar>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "Application.h"
|
||||
|
||||
Application::Application(int& argc, char** argv) : QApplication(argc, argv) {
|
||||
// simple menu bar (will only appear on OS X, for now)
|
||||
QMenuBar* menuBar = new QMenuBar();
|
||||
QMenu* fileMenu = menuBar->addMenu("File");
|
||||
fileMenu->addAction("Test", this, SLOT(testSlot()));
|
||||
}
|
||||
|
||||
void Application::testSlot() {
|
||||
qDebug() << "Hello world.";
|
||||
}
|
26
interface/src/Application.h
Normal file
26
interface/src/Application.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// Application.h
|
||||
// interface
|
||||
//
|
||||
// Created by Andrzej Kapolka on 5/10/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef __interface__Application__
|
||||
#define __interface__Application__
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
class Application : public QApplication {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
Application(int& argc, char** argv);
|
||||
|
||||
public slots:
|
||||
|
||||
void testSlot();
|
||||
};
|
||||
|
||||
#endif /* defined(__interface__Application__) */
|
|
@ -31,8 +31,6 @@
|
|||
#include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
@ -61,6 +59,7 @@
|
|||
#include "renderer/ProgramObject.h"
|
||||
#include "renderer/ShaderObject.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "Camera.h"
|
||||
#include "Avatar.h"
|
||||
#include <AgentList.h>
|
||||
|
@ -86,8 +85,6 @@ void loadViewFrustum(ViewFrustum& viewFrustum); // will be defined below
|
|||
|
||||
glm::vec3 getGravity(glm::vec3 pos); //get the local gravity vector at this location in the universe
|
||||
|
||||
QApplication* app;
|
||||
|
||||
bool enableNetworkThread = true;
|
||||
pthread_t networkReceiveThread;
|
||||
bool stopNetworkReceiveThread = false;
|
||||
|
@ -2042,9 +2039,9 @@ int main(int argc, const char * argv[]) {
|
|||
#endif
|
||||
|
||||
// we need to create a QApplication instance in order to use Qt's font rendering
|
||||
app = new QApplication(argc, const_cast<char**>(argv));
|
||||
Application app(argc, const_cast<char**>(argv));
|
||||
printLog( "Created QT Application.\n" );
|
||||
|
||||
|
||||
// Before we render anything, let's set up our viewFrustumOffsetCamera with a sufficiently large
|
||||
// field of view and near and far clip to make it interesting.
|
||||
//viewFrustumOffsetCamera.setFieldOfView(90.0);
|
||||
|
|
Loading…
Reference in a new issue