Cogs.Core
BuffersCommon.cpp
1#include "Foundation/Logging/Logger.h"
2#include "BuffersCommon.h"
3#include "ContextCommon.h"
4
5namespace
6{
7 Cogs::Logging::Log logger = Cogs::Logging::getLogger("BuffersCommon");
8}
9
10Cogs::VertexFormatHandle Cogs::BuffersCommon::createVertexFormat(const VertexElement * elements, size_t count)
11{
12 return VertexFormats::createVertexFormat(elements, count);
13}
14
15const Cogs::VertexFormat *Cogs::BuffersCommon::getVertexFormat(VertexFormatHandle handle)
16{
17 return VertexFormats::getVertexFormat(handle);
18}
19
21 const VertexBufferHandle*, const size_t,
22 const VertexFormat* const*, const uint32_t*, const uint32_t*,
23 const IndexBufferHandle, uint32_t)
24{
25 LOG_ERROR_ONCE(logger, "loadVertexArrayObject: Rendering context does not support vertex array objects.");
27}
28
30{
31 LOG_ERROR_ONCE(logger, "releaseVertexArrayObject: Rendering context does not support vertex array objects.");
32}
Log implementation class.
Definition: LogManager.h:139
constexpr Log getLogger(const char(&name)[LEN]) noexcept
Definition: LogManager.h:180
virtual VertexArrayObjectHandle loadVertexArrayObject(const EffectHandle effectHandle, const VertexBufferHandle *vertexBufferHandles, const size_t vertexBufferCount, const VertexFormat *const *vertexFormats=nullptr, const uint32_t *vertexBufferStrides=nullptr, const uint32_t *vertexBufferOffsets=nullptr, const IndexBufferHandle indexBufferHandle=IndexBufferHandle::NoHandle, uint32_t indexBufferStride=0) override
virtual void releaseVertexArrayObject(VertexArrayObjectHandle) override
static const Handle_t InvalidHandle
Represents an invalid handle.
Definition: Common.h:80
Vertex format structure used to describe a single vertex for the input assembler.
Definition: VertexFormat.h:60