Trying to fix the type unkwon issues and other #include problems on linux vs windows

This commit is contained in:
Sam Gateau 2014-10-28 16:57:47 -07:00
parent b8a8c7f639
commit 639497003d
4 changed files with 15 additions and 14 deletions

View file

@ -14,20 +14,20 @@
#include <assert.h>
#include "InterfaceConfig.h"
#include "gpu/Resource.h"
namespace gpu {
class GPUObject {
public:
GPUObject() {}
~GPUObject() {}
};
class Batch;
class Buffer;
class Backend {
public:
class GPUObject {
public:
GPUObject() {}
~GPUObject() {}
};
template< typename T >
static void setGPUObject(const Buffer& buffer, T* bo) {

View file

@ -12,7 +12,7 @@
#include <QDebug>
#include "gpu/Resource.h"
#include "gpu/Batch.h"
using namespace gpu;

View file

@ -14,6 +14,7 @@
#include <assert.h>
#include "InterfaceConfig.h"
#include "gpu/Context.h"
#include "gpu/Batch.h"
namespace gpu {
@ -34,7 +35,7 @@ public:
};
void syncGPUObject(const Buffer& buffer);
class GLBackend {
class GLBackend : public Backend {
public:
GLBackend();

View file

@ -14,11 +14,11 @@
#include <assert.h>
#include "InterfaceConfig.h"
#include "gpu/Context.h"
namespace gpu {
class Buffer;
class GPUObject;
typedef int Stamp;
class Resource {
@ -131,13 +131,13 @@ protected:
Sysmem* _sysmem;
mutable Backend::GPUObject* _gpuObject;
mutable GPUObject* _gpuObject;
Sysmem& editSysmem() { assert(_sysmem); return (*_sysmem); }
// This shouldn't be used by anything else than the Backend class with the proper casting.
void setGPUObject(Backend::GPUObject* gpuObject) const { _gpuObject = gpuObject; }
Backend::GPUObject* getGPUObject() const { return _gpuObject; }
void setGPUObject(GPUObject* gpuObject) const { _gpuObject = gpuObject; }
GPUObject* getGPUObject() const { return _gpuObject; }
friend class Backend;
};