fix mac build

This commit is contained in:
ZappoMan 2015-09-23 16:48:34 -07:00
parent 24e2215f14
commit 65a079cb53
12 changed files with 52 additions and 9 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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

View 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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -17,6 +17,7 @@
#include <gpu/Batch.h>
#include <gpu/Context.h>
#include <gpu/DoInBatch.h>
#include <gpu/StandardShaderLib.h>
#include "AbstractViewStateInterface.h"

View file

@ -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"

View file

@ -15,6 +15,7 @@
#include <RenderArgs.h>
#include <ViewFrustum.h>
#include <gpu/Context.h>
#include <gpu/DoInBatch.h>
#include "FramebufferCache.h"
#include "DeferredLightingEffect.h"

View file

@ -19,6 +19,7 @@
#include <RenderArgs.h>
#include <gpu/Context.h>
#include <gpu/DoInBatch.h>
#include "drawItemBounds_vert.h"
#include "drawItemBounds_frag.h"

View file

@ -18,6 +18,8 @@
#include <RenderArgs.h>
#include <ViewFrustum.h>
#include <gpu/Context.h>
#include <gpu/DoInBatch.h>
using namespace render;