Files
NazaraEngine/src/Nazara/Utility/SoftwareBuffer.hpp
Lynix ea8d683624 Updated copyright year
(532 files, wow)


Former-commit-id: cbb31f1124a86720bd3a54fe589a0f849a87b434
2015-01-21 20:53:01 +01:00

36 lines
914 B
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_SOFTWAREBUFFER_HPP
#define NAZARA_SOFTWAREBUFFER_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Utility/AbstractBuffer.hpp>
class NzSoftwareBuffer : public NzAbstractBuffer
{
public:
NzSoftwareBuffer(NzBuffer* parent, nzBufferType type);
~NzSoftwareBuffer();
bool Create(unsigned int size, nzBufferUsage usage = nzBufferUsage_Static);
void Destroy();
bool Fill(const void* data, unsigned int offset, unsigned int size, bool forceDiscard);
bool IsHardware() const;
void* Map(nzBufferAccess access, unsigned int offset = 0, unsigned int size = 0);
bool Unmap();
private:
nzBufferType m_type;
nzUInt8* m_buffer;
bool m_mapped;
};
#endif // NAZARA_SOFTWAREBUFFER_HPP