mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Remove vertex namespace
This commit is contained in:
@@ -212,8 +212,8 @@ public:
|
||||
{
|
||||
PrimitiveType primitiveType = PRIMITIVE_TRIANGLES;
|
||||
|
||||
const vertex::Attributes *attributes;
|
||||
const vertex::BufferBindings *buffers;
|
||||
const Attributes *attributes;
|
||||
const BufferBindings *buffers;
|
||||
|
||||
int vertexStart = 0;
|
||||
int vertexCount = 0;
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
// TODO: This should be moved out to a state transition API?
|
||||
CullMode cullMode = CULL_NONE;
|
||||
|
||||
DrawCommand(const vertex::Attributes *attribs, const vertex::BufferBindings *buffers)
|
||||
DrawCommand(const Attributes *attribs, const BufferBindings *buffers)
|
||||
: attributes(attribs)
|
||||
, buffers(buffers)
|
||||
{}
|
||||
@@ -234,8 +234,8 @@ public:
|
||||
{
|
||||
PrimitiveType primitiveType = PRIMITIVE_TRIANGLES;
|
||||
|
||||
const vertex::Attributes *attributes;
|
||||
const vertex::BufferBindings *buffers;
|
||||
const Attributes *attributes;
|
||||
const BufferBindings *buffers;
|
||||
|
||||
int indexCount = 0;
|
||||
int instanceCount = 1;
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
// TODO: This should be moved out to a state transition API?
|
||||
CullMode cullMode = CULL_NONE;
|
||||
|
||||
DrawIndexedCommand(const vertex::Attributes *attribs, const vertex::BufferBindings *buffers, Resource *indexbuffer)
|
||||
DrawIndexedCommand(const Attributes *attribs, const BufferBindings *buffers, Resource *indexbuffer)
|
||||
: attributes(attribs)
|
||||
, buffers(buffers)
|
||||
, indexBuffer(indexbuffer)
|
||||
@@ -259,8 +259,8 @@ public:
|
||||
struct StreamDrawCommand
|
||||
{
|
||||
PrimitiveType primitiveMode = PRIMITIVE_TRIANGLES;
|
||||
vertex::CommonFormat formats[2];
|
||||
vertex::TriangleIndexMode indexMode = vertex::TriangleIndexMode::NONE;
|
||||
CommonFormat formats[2];
|
||||
TriangleIndexMode indexMode = TriangleIndexMode::NONE;
|
||||
int vertexCount = 0;
|
||||
Texture *texture = nullptr;
|
||||
Shader::StandardShader standardShaderType = Shader::STANDARD_DEFAULT;
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
StreamDrawCommand()
|
||||
{
|
||||
// VS2013 can't initialize arrays in the above manner...
|
||||
formats[1] = formats[0] = vertex::CommonFormat::NONE;
|
||||
formats[1] = formats[0] = CommonFormat::NONE;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -437,7 +437,7 @@ public:
|
||||
Font *newDefaultFont(int size, font::TrueTypeRasterizer::Hinting hinting, const Texture::Filter &filter = Texture::defaultFilter);
|
||||
Video *newVideo(love::video::VideoStream *stream, float dpiscale);
|
||||
|
||||
SpriteBatch *newSpriteBatch(Texture *texture, int size, vertex::Usage usage);
|
||||
SpriteBatch *newSpriteBatch(Texture *texture, int size, BufferUsage usage);
|
||||
ParticleSystem *newParticleSystem(Texture *texture, int size);
|
||||
|
||||
virtual Canvas *newCanvas(const Canvas::Settings &settings) = 0;
|
||||
@@ -445,15 +445,15 @@ public:
|
||||
ShaderStage *newShaderStage(ShaderStage::StageType stage, const std::string &source);
|
||||
Shader *newShader(const std::string &vertex, const std::string &pixel);
|
||||
|
||||
virtual Buffer *newBuffer(size_t size, const void *data, BufferTypeFlags typeflags, vertex::Usage usage, uint32 mapflags) = 0;
|
||||
virtual Buffer *newBuffer(size_t size, const void *data, BufferTypeFlags typeflags, BufferUsage usage, uint32 mapflags) = 0;
|
||||
virtual Buffer *newBuffer(const Buffer::Settings &settings, const std::vector<Buffer::DataMember> &format, size_t arraylength) = 0;
|
||||
|
||||
// Buffer *newIndexBuffer(IndexDataType dataType, const void *indices, size_t bytesize, vertex::Usage usage, uint32 mapflags) = 0;
|
||||
|
||||
Mesh *newMesh(const std::vector<Vertex> &vertices, PrimitiveType drawmode, vertex::Usage usage);
|
||||
Mesh *newMesh(int vertexcount, PrimitiveType drawmode, vertex::Usage usage);
|
||||
Mesh *newMesh(const std::vector<Mesh::AttribFormat> &vertexformat, int vertexcount, PrimitiveType drawmode, vertex::Usage usage);
|
||||
Mesh *newMesh(const std::vector<Mesh::AttribFormat> &vertexformat, const void *data, size_t datasize, PrimitiveType drawmode, vertex::Usage usage);
|
||||
Mesh *newMesh(const std::vector<Vertex> &vertices, PrimitiveType drawmode, BufferUsage usage);
|
||||
Mesh *newMesh(int vertexcount, PrimitiveType drawmode, BufferUsage usage);
|
||||
Mesh *newMesh(const std::vector<Mesh::AttribFormat> &vertexformat, int vertexcount, PrimitiveType drawmode, BufferUsage usage);
|
||||
Mesh *newMesh(const std::vector<Mesh::AttribFormat> &vertexformat, const void *data, size_t datasize, PrimitiveType drawmode, BufferUsage usage);
|
||||
|
||||
Text *newText(Font *font, const std::vector<Font::ColoredString> &text = {});
|
||||
|
||||
@@ -597,8 +597,8 @@ public:
|
||||
void setMeshCullMode(CullMode cull);
|
||||
CullMode getMeshCullMode() const;
|
||||
|
||||
virtual void setFrontFaceWinding(vertex::Winding winding) = 0;
|
||||
vertex::Winding getFrontFaceWinding() const;
|
||||
virtual void setFrontFaceWinding(Winding winding) = 0;
|
||||
Winding getFrontFaceWinding() const;
|
||||
|
||||
/**
|
||||
* Sets the enabled color components when rendering.
|
||||
@@ -833,7 +833,7 @@ public:
|
||||
|
||||
virtual void draw(const DrawCommand &cmd) = 0;
|
||||
virtual void draw(const DrawIndexedCommand &cmd) = 0;
|
||||
virtual void drawQuads(int start, int count, const vertex::Attributes &attributes, const vertex::BufferBindings &buffers, Texture *texture) = 0;
|
||||
virtual void drawQuads(int start, int count, const Attributes &attributes, const BufferBindings &buffers, Texture *texture) = 0;
|
||||
|
||||
void flushStreamDraws();
|
||||
StreamVertexData requestStreamDraw(const StreamDrawCommand &command);
|
||||
@@ -910,7 +910,7 @@ protected:
|
||||
bool depthWrite = false;
|
||||
|
||||
CullMode meshCullMode = CULL_NONE;
|
||||
vertex::Winding winding = vertex::WINDING_CCW;
|
||||
Winding winding = WINDING_CCW;
|
||||
|
||||
StrongRef<Font> font;
|
||||
StrongRef<Shader> shader;
|
||||
@@ -933,7 +933,7 @@ protected:
|
||||
StreamBuffer *indexBuffer = nullptr;
|
||||
|
||||
PrimitiveType primitiveMode = PRIMITIVE_TRIANGLES;
|
||||
vertex::CommonFormat formats[2];
|
||||
CommonFormat formats[2];
|
||||
StrongRef<Texture> texture;
|
||||
Shader::StandardShader standardShaderType = Shader::STANDARD_DEFAULT;
|
||||
int vertexCount = 0;
|
||||
@@ -945,7 +945,7 @@ protected:
|
||||
StreamBufferState()
|
||||
{
|
||||
vb[0] = vb[1] = nullptr;
|
||||
formats[0] = formats[1] = vertex::CommonFormat::NONE;
|
||||
formats[0] = formats[1] = CommonFormat::NONE;
|
||||
vbMap[0] = vbMap[1] = StreamBuffer::MapInfo();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user