Moved buffers to Utility

Fixed NzVector4::operator/
Replaced enumName_Count by enumName_Max
Renamed (Index/Vertex)Buffer::GetBufferPtr by GetPointer
This commit is contained in:
Lynix
2012-06-21 09:49:47 +02:00
parent be0a5d2819
commit ec9470ceb6
31 changed files with 291 additions and 258 deletions

View File

@@ -0,0 +1,37 @@
// Copyright (C) 2012 Jérôme Leclercq
// This file is part of the "Nazara Engine".
// 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/BufferImpl.hpp>
class NzSoftwareBuffer : public NzBufferImpl
{
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 length);
void* GetPointer();
bool IsHardware() const;
void* Map(nzBufferAccess access, unsigned int offset = 0, unsigned int length = 0);
bool Unmap();
private:
nzBufferType m_type;
nzUInt8* m_buffer;
bool m_mapped;
};
#endif // NAZARA_SOFTWAREBUFFER_HPP