Skeleton GPU files.

This commit is contained in:
Ben Vanik
2013-05-27 21:45:55 -07:00
parent 16baef3591
commit 2cecc02787
19 changed files with 501 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_NOP_NOP_PRIVATE_H_
#define XENIA_GPU_NOP_NOP_PRIVATE_H_
#include <xenia/core.h>
#include <xenia/gpu/nop/nop.h>
namespace xe {
namespace gpu {
namespace nop {
} // namespace nop
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_NOP_NOP_PRIVATE_H_

44
src/xenia/gpu/nop/nop.cc Normal file
View File

@@ -0,0 +1,44 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/nop/nop.h>
#include <xenia/gpu/nop/nop_graphics_system.h>
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::nop;
namespace {
void InitializeIfNeeded();
void CleanupOnShutdown();
void InitializeIfNeeded() {
static bool has_initialized = false;
if (has_initialized) {
return;
}
has_initialized = true;
//
atexit(CleanupOnShutdown);
}
void CleanupOnShutdown() {
}
}
GraphicsSystem* xe::gpu::nop::Create(const CreationParams* params) {
InitializeIfNeeded();
return new NopGraphicsSystem(params);
}

33
src/xenia/gpu/nop/nop.h Normal file
View File

@@ -0,0 +1,33 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_NOP_NOP_H_
#define XENIA_GPU_NOP_NOP_H_
#include <xenia/core.h>
namespace xe {
namespace gpu {
class CreationParams;
class GraphicsSystem;
namespace nop {
GraphicsSystem* Create(const CreationParams* params);
} // namespace nop
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_NOP_NOP_H_

View File

@@ -0,0 +1,25 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/nop/nop_graphics_system.h>
#include <xenia/gpu/gpu-private.h>
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::nop;
NopGraphicsSystem::NopGraphicsSystem(const CreationParams* params) :
GraphicsSystem(params) {
}
NopGraphicsSystem::~NopGraphicsSystem() {
}

View File

@@ -0,0 +1,36 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_NOP_NOP_GRAPHICS_SYSTEM_H_
#define XENIA_GPU_NOP_NOP_GRAPHICS_SYSTEM_H_
#include <xenia/core.h>
#include <xenia/gpu/graphics_system.h>
#include <xenia/gpu/nop/nop-private.h>
namespace xe {
namespace gpu {
namespace nop {
class NopGraphicsSystem : public GraphicsSystem {
public:
NopGraphicsSystem(const CreationParams* params);
virtual ~NopGraphicsSystem();
};
} // namespace nop
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_NOP_NOP_GRAPHICS_SYSTEM_H_

View File

@@ -0,0 +1,10 @@
# Copyright 2013 Ben Vanik. All Rights Reserved.
{
'sources': [
'nop-private.h',
'nop.cc',
'nop.h',
'nop_graphics_system.cc',
'nop_graphics_system.h',
],
}