Added AABBs Added code examples Added experimental support for texture arrays (1D/2D) Added initialisers (new way of initialising modules) Added global headers (Plus a global header generator script) Added pattern support for directory Added support for spinlocks critical section on Windows Added NzRenderWindow::SetFramerateLimit Core project now includes Mathematics files Fixed color implementation using double Fixed declaration needing renderer include Fixed MLT not clearing nextFree(File/Line) after Free Fixed move operators not being noexcept Fixed thread-safety (Now working correctly - If I'm lucky) Moved Resource to core New interface for modules New interface for the renderer Put some global functions to anonymous namespace Removed empty modules Renamed ThreadCondition to ConditionVariable Replaced redirect to cerr log option by duplicate to cout Setting mouse position relative to a window will make this window ignore the event Shaders sending methods no longer takes the uniform variable name (it's using ID instead) Using new OpenGL 4.3 header
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
// 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_VERTEXBUFFER_HPP
|
|
#define NAZARA_VERTEXBUFFER_HPP
|
|
|
|
#include <Nazara/Prerequesites.hpp>
|
|
#include <Nazara/Core/Resource.hpp>
|
|
#include <Nazara/Utility/Buffer.hpp>
|
|
|
|
class NAZARA_API NzVertexBuffer : public NzResource
|
|
{
|
|
public:
|
|
NzVertexBuffer(NzBuffer* buffer, unsigned int startVertex, unsigned int vertexCount);
|
|
NzVertexBuffer(unsigned int length, nzUInt8 typeSize, nzBufferStorage storage = nzBufferStorage_Software, nzBufferUsage usage = nzBufferUsage_Static);
|
|
NzVertexBuffer(const NzVertexBuffer& vertexBuffer);
|
|
~NzVertexBuffer();
|
|
|
|
bool Fill(const void* data, unsigned int offset, unsigned int length);
|
|
|
|
NzBuffer* GetBuffer() const;
|
|
void* GetPointer();
|
|
const void* GetPointer() const;
|
|
unsigned int GetStartVertex() const;
|
|
nzUInt8 GetTypeSize() const;
|
|
unsigned int GetVertexCount() const;
|
|
|
|
bool IsHardware() const;
|
|
|
|
void* Map(nzBufferAccess access, unsigned int offset = 0, unsigned int length = 0);
|
|
|
|
bool SetStorage(nzBufferStorage storage);
|
|
|
|
bool Unmap();
|
|
|
|
private:
|
|
NzBuffer* m_buffer;
|
|
bool m_ownsBuffer;
|
|
unsigned int m_startVertex;
|
|
unsigned int m_vertexCount;
|
|
};
|
|
|
|
#endif // NAZARA_VERTEXBUFFER_HPP
|