mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 10:03:37 +02:00
fix mac build
This commit is contained in:
parent
24e2215f14
commit
65a079cb53
12 changed files with 52 additions and 9 deletions
|
@ -69,6 +69,7 @@
|
|||
#include <FramebufferCache.h>
|
||||
#include <gpu/Batch.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
#include <gpu/GLBackend.h>
|
||||
#include <HFActionEvent.h>
|
||||
#include <HFBackEvent.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
#include <avatar/AvatarManager.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
#include <gpu/GLBackend.h>
|
||||
#include <NumericalConstants.h>
|
||||
|
||||
|
|
|
@ -379,13 +379,4 @@ protected:
|
|||
|
||||
QDebug& operator<<(QDebug& debug, const gpu::Batch::CacheState& cacheState);
|
||||
|
||||
template<typename F>
|
||||
void doInBatch(RenderArgs* args, F f) {
|
||||
static gpu::Batch::CacheState cacheState;
|
||||
gpu::Batch batch(cacheState);
|
||||
f(batch);
|
||||
args->_context->render(batch);
|
||||
cacheState = batch.getCacheState();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
41
libraries/gpu/src/gpu/DoInBatch.h
Normal file
41
libraries/gpu/src/gpu/DoInBatch.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// DoInBatch.h
|
||||
// interface/src/gpu
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 2015/09/23.
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#ifndef hifi_gpu_DoInBatch_h
|
||||
#define hifi_gpu_DoInBatch_h
|
||||
|
||||
#include <RenderArgs.h>
|
||||
|
||||
#include "Batch.h"
|
||||
//#include "Framebuffer.h"
|
||||
//#include "Pipeline.h"
|
||||
//#include "Query.h"
|
||||
//#include "Stream.h"
|
||||
//#include "Texture.h"
|
||||
//#include "Transform.h"
|
||||
|
||||
// FIXME - technically according to our coding standard Context.h should be before "Framebuffer.h" but it appears
|
||||
// as if Context.h is not self contained and assumes other users have included other gpu headers.
|
||||
#include "Context.h"
|
||||
|
||||
template<typename F>
|
||||
void doInBatch(RenderArgs* args, F f) {
|
||||
static gpu::Batch::CacheState cacheState;
|
||||
gpu::Batch batch(cacheState);
|
||||
f(batch);
|
||||
args->_context->render(batch);
|
||||
cacheState = batch.getCacheState();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
#include "GeometryCache.h"
|
||||
#include <gpu/Batch.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
#include <DeferredLightingEffect.h>
|
||||
#include <display-plugins/openvr/OpenVrHelpers.h>
|
||||
#include "NumericalConstants.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <PathUtils.h>
|
||||
#include <SharedUtil.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
|
||||
#include "gpu/StandardShaderLib.h"
|
||||
#include "AmbientOcclusionEffect.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <PathUtils.h>
|
||||
#include <SharedUtil.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
|
||||
#include "gpu/StandardShaderLib.h"
|
||||
#include "AntialiasingEffect.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <gpu/Batch.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
#include <gpu/StandardShaderLib.h>
|
||||
|
||||
#include "AbstractViewStateInterface.h"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "GeometryCache.h"
|
||||
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
|
||||
#include "hit_effect_vert.h"
|
||||
#include "hit_effect_frag.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <RenderArgs.h>
|
||||
#include <ViewFrustum.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
|
||||
#include "FramebufferCache.h"
|
||||
#include "DeferredLightingEffect.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <RenderArgs.h>
|
||||
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
|
||||
#include "drawItemBounds_vert.h"
|
||||
#include "drawItemBounds_frag.h"
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include <RenderArgs.h>
|
||||
#include <ViewFrustum.h>
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/DoInBatch.h>
|
||||
|
||||
|
||||
using namespace render;
|
||||
|
||||
|
|
Loading…
Reference in a new issue