Skip to content

Commit

Permalink
Merge branch 'master' into profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
reinago committed Sep 23, 2021
2 parents 0e51270 + c7a0978 commit 5547379
Show file tree
Hide file tree
Showing 319 changed files with 10,237 additions and 24,896 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pr:
- master

variables:
enablePlugins: '-DBUILD_PLUGIN_ADIOS_PLUGIN=ON -DBUILD_PLUGIN_ASTRO=ON -DBUILD_PLUGIN_IMAGEVIEWER2=ON -DBUILD_PLUGIN_MEGAMOL101=ON -DBUILD_PLUGIN_MMVTKM=ON -DBUILD_PLUGIN_REMOTE=ON'
enablePlugins: '-DBUILD_PLUGIN_ADIOS_PLUGIN=ON -DBUILD_PLUGIN_ASTRO=OFF -DBUILD_PLUGIN_IMAGEVIEWER2=OFF -DBUILD_PLUGIN_MEGAMOL101=ON -DBUILD_PLUGIN_MMVTKM=ON -DBUILD_PLUGIN_REMOTE=OFF'

jobs:
- job: Windows
Expand Down
12 changes: 2 additions & 10 deletions console/src/gl/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using namespace megamol::console;

gl::Window::Window(const char* title, const utility::WindowPlacement & placement, GLFWwindow* share)
: glfw(),
hView(), hWnd(nullptr), width(-1), height(-1), renderContext(), uiLayers(), mouseCapture(),
hView(), hWnd(nullptr), width(-1), height(-1), uiLayers(), mouseCapture(),
name(title), fpsCntr(), fps(1000.0f), fpsList(), showFpsInTitle(true), fpsSyncTime(), topMost(false),
fragmentQuery(0), showFragmentsInTitle(false), showPrimsInTitle(false), firstUpdate(true) {

Expand All @@ -45,14 +45,6 @@ gl::Window::Window(const char* title, const utility::WindowPlacement & placement
}
for (float& f : fpsList) f = 0.0f;

memset(&renderContext, 0, sizeof(mmcRenderViewContext));
renderContext.Size = sizeof(mmcRenderViewContext);
renderContext.ContinuousRedraw = true;
renderContext.GpuAffinity = nullptr;
renderContext.Direct3DRenderTarget = nullptr;
renderContext.InstanceTime = 0.0; // will be generated by core
renderContext.Time = 0.0; // will be generated by core

glfw = glfwInst::Instance(); // we use glfw
if (glfw->OK()) {
if (utility::HotFixes::Instance().IsHotFixed("usealphabuffer")) {
Expand Down Expand Up @@ -261,7 +253,7 @@ void gl::Window::Update(uint32_t frameID) {
if ((width > 0) && (height > 0)) {
if (showFragmentsInTitle) glBeginQuery(GL_SAMPLES_PASSED, fragmentQuery);
if (showPrimsInTitle) glBeginQuery(GL_PRIMITIVES_GENERATED, primsQuery);
::mmcRenderView(hView, &renderContext, frameID);
::mmcRenderView(hView, frameID);
if (showFragmentsInTitle) glEndQuery(GL_SAMPLES_PASSED);
if (showPrimsInTitle) glEndQuery(GL_PRIMITIVES_GENERATED);
}
Expand Down
1 change: 0 additions & 1 deletion console/src/gl/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ namespace gl {
std::shared_ptr<glfwInst> glfw;
GLFWwindow *hWnd; // glfw window handle
int width, height;
mmcRenderViewContext renderContext;
UILayersCollection uiLayers;
std::shared_ptr<AbstractUILayer> mouseCapture;
std::string name;
Expand Down
1 change: 0 additions & 1 deletion core/include/mmcore/FlagCollections.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#pragma once

#define GLOWL_OPENGL_INCLUDE_GLAD
#include "glowl/BufferObject.hpp"

#include "FlagStorage.h"
Expand Down
2 changes: 0 additions & 2 deletions core/include/mmcore/UniFlagStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#pragma once

#define GLOWL_OPENGL_INCLUDE_GLAD

#include "vislib/graphics/gl/IncludeAllGL.h"

#include "FlagCollections.h"
Expand Down
78 changes: 1 addition & 77 deletions core/include/mmcore/api/MegaMolCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,55 +173,6 @@ typedef int mmcInputButton;
*/
typedef int mmcInputButtonAction;

/** User context for mmcRenderView function. */
typedef struct _mmcRenderViewContext {
/**
* The size of this structure (Must remain first member in any future
* version and must always be four-byte integer).
*/
VL_INT32 Size;

/**
* Boolean to receive whether or not a continuous redraw of this view is
* required (Must remain second member at offset 4 Bytes in any future
* version).
*/
bool ContinuousRedraw;

// D3D defines the GPU affinity via the device object, therefore we do not
// need the device index in this case.
union {
/** (Dumb) pointer to a Direct3D device if a D3D renderer is active. */
void *Direct3DDevice;

/**
* Specifies the the GPU that the viewer uses for rendering the view.
* If the viewer does not know about the GPU or the GPU is not relevant,
* this handle is nullptr.
*
* On a Windows machine with NVDIA GPU, the pointer is actually a
* HGPUNV; we do not use the type here in order to prevent the OpenGL
* extension header being included in the MegaMol core API header.
*
* In all other cases, this parameter currently has no meaning.
*/
void *GpuAffinity;
};

/** (Dumb) pointer to the Direct3D render target. */
void *Direct3DRenderTarget;

/** The instance time, which is generated by mmcRenderView. */
double InstanceTime;

/**
* If positive, force the time to this value in mmcRenderView().
* Otherwise, use the time generated by the view module.
* If negative, store this time value into the context afterwards.
*/
double Time;
} mmcRenderViewContext;

/** Library building flags */
#define MMC_BFLAG_DEBUG 0x00000001 // debug build
#define MMC_BFLAG_DIRTY 0x00000002 // dirty build (DO NOT RELEASE!)
Expand Down Expand Up @@ -584,7 +535,7 @@ MEGAMOLCORE_API bool MEGAMOLCORE_CALL mmcInstantiatePendingJob(void *hCore,
* with sizeof(mmcRenderViewContext) before the call is made.
* @param frameID the count of rendered frames so far
*/
MEGAMOLCORE_API void MEGAMOLCORE_CALL mmcRenderView(void *hView, mmcRenderViewContext* context, uint32_t frameID);
MEGAMOLCORE_API void MEGAMOLCORE_CALL mmcRenderView(void *hView, uint32_t frameID);

/**
* Registers a view close request function for the view. This function will be
Expand Down Expand Up @@ -669,23 +620,6 @@ MEGAMOLCORE_API bool MEGAMOLCORE_CALL mmcSendMouseMoveEvent(void *hView,
MEGAMOLCORE_API bool MEGAMOLCORE_CALL mmcSendMouseScrollEvent(void *hView,
float dx, float dy);

/**
* Answers the desired window position configuration of this view.
*
* @param hView The view instance handle.
* @param x To receive the coordinate of the upper left corner
* @param y To recieve the coordinate of the upper left corner
* @param w To receive the width
* @param h To receive the height
* @param nd To receive the flag deactivating window decorations
*
* @return 'true' if this view has a desired window position configuration,
* 'false' if not. In the latter case the value the parameters are
* pointing to are not altered.
*/
MEGAMOLCORE_API bool MEGAMOLCORE_CALL mmcDesiredViewWindowConfig(void *hView,
int *x, int *y, int *w, int *h, bool *nd);

/**
* Gets whether or not a given job is running.
*
Expand Down Expand Up @@ -941,16 +875,6 @@ MEGAMOLCORE_API void MEGAMOLCORE_CALL mmcGetParameterTypeDescription(
*/
MEGAMOLCORE_API size_t MEGAMOLCORE_CALL mmcGetGlobalParameterHash(void *hCore);

/**
* Freezes, updates or unfreezes a view (and all associated modules)
*
* @param hView The view to be frozen or updated
* @param freeze The action flag: true means freeze or update,
* false means unfreeze.
*/
MEGAMOLCORE_API void MEGAMOLCORE_CALL mmcFreezeOrUpdateView(
void *hView, bool freeze);

#ifndef MEGAMOLCORE_EXT_API
#define MEGAMOLCORE_EXT_API 1
#define MEGAMOLCORE_EXT_APICALL(A, B) MEGAMOLCORE_API A MEGAMOLCORE_CALL B
Expand Down
132 changes: 0 additions & 132 deletions core/include/mmcore/special/AbstractStereoDisplay.h

This file was deleted.

17 changes: 6 additions & 11 deletions core/include/mmcore/thecam/arcball_manipulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
# pragma managed(push, off)
#endif /* defined(_WIN32) && defined(_MANAGED) */

#include "mmcore/thecam/utility/config.h"

#include <glm/glm.hpp>
#include "mmcore/thecam/manipulator_base.h"


namespace megamol {
namespace core {
namespace thecam {
Expand All @@ -57,15 +55,12 @@ template <class T> class arcball_manipulator : public manipulator_base<T> {
/** The type of the camera to be manipulated by the manipulator. */
typedef typename manipulator_base<T>::camera_type camera_type;

/** The mathematical traits of the camera. */
typedef typename manipulator_base<T>::maths_type maths_type;

// Typedef all mathematical types we need in the manipulator.
typedef typename maths_type::point_type point_type;
typedef typename maths_type::quaternion_type quaternion_type;
typedef typename maths_type::screen_type screen_type;
typedef typename maths_type::vector_type vector_type;
typedef typename maths_type::world_type world_type;
typedef typename glm::vec4 point_type;
typedef typename glm::quat quaternion_type;
typedef int screen_type;
typedef typename glm::vec4 vector_type;
typedef float world_type;

arcball_manipulator() = default;

Expand Down
Loading

0 comments on commit 5547379

Please sign in to comment.