Updated the readme.

This commit is contained in:
Alex Szpakowski
2015-03-04 03:21:26 -04:00
parent 06fa7bd7a4
commit e2652fddc1
7 changed files with 35 additions and 22 deletions
+13 -1
View File
@@ -24,6 +24,16 @@ Download the required frameworks from [here][dependencies] and place them in `/L
Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-macosx` target.
###iOS
Download the required libraries from [here][dependencies-ios] and place the `include` and `libraries` folders
into the `platform/xcode/ios` folder.
Then use the Xcode project foind at `platform/xcode/love.xcodeproj` to build the `love-ios` target.
Note that you must be registered in the [iOS Developer Program][iosdeveloper] in order to build for physical iOS devices.
The iOS version is currently a work-in-progress.
Repository information
----------------------
@@ -54,7 +64,7 @@ Dependencies
- OpenGL
- OpenAL
- Lua / LuaJIT / LLVM-lua
- DevIL with MNG and TIFF
- jpeg-turbo
- FreeType
- PhysicsFS
- ModPlug
@@ -66,9 +76,11 @@ Dependencies
[forums]: http://love2d.org/forums
[irc]: irc://irc.oftc.net/love
[dependencies]: http://love2d.org/sdk
[dependencies-ios]: https://dl.dropboxusercontent.com/u/4214717/love-ios-libraries-0.10.zip
[megasource]: https://bitbucket.org/rude/megasource
[builds]: http://love2d.org/builds
[stableppa]: https://launchpad.net/~bartbes/+archive/love-stable
[unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable
[aur]: http://aur.archlinux.org/packages.php?ID=35279
[love-experiments]: https://bitbucket.org/bartbes/love-experiments
[iosdeveloper]: https://developer.apple.com/programs/ios/
+7 -7
View File
@@ -48,7 +48,7 @@ Font::Font(love::font::Rasterizer *r, const Texture::Filter &filter)
, textureHeight(128)
, filter(filter)
, useSpacesAsTab(false)
, indexBuffer(20) // We make this bigger at draw-time, if needed.
, quadIndices(20) // We make this bigger at draw-time, if needed.
, textureCacheID(0)
, textureMemorySize(0)
{
@@ -523,15 +523,15 @@ void Font::drawVertices(const std::vector<DrawCommand> &drawcommands)
for (const DrawCommand &cmd : drawcommands)
totalverts = std::max(cmd.startvertex + cmd.vertexcount, totalverts);
if ((size_t) totalverts / 4 > indexBuffer.getSize())
indexBuffer = VertexIndex((size_t) totalverts / 4);
if ((size_t) totalverts / 4 > quadIndices.getSize())
quadIndices = VertexIndex((size_t) totalverts / 4);
gl.prepareDraw();
const GLenum gltype = indexBuffer.getType();
const size_t elemsize = indexBuffer.getElementSize();
const GLenum gltype = quadIndices.getType();
const size_t elemsize = quadIndices.getElementSize();
GLBuffer::Bind bind(*indexBuffer.getBuffer());
GLBuffer::Bind bind(*quadIndices.getBuffer());
// We need a separate draw call for every section of the text which uses a
// different texture than the previous section.
@@ -542,7 +542,7 @@ void Font::drawVertices(const std::vector<DrawCommand> &drawcommands)
// TODO: Use glDrawElementsBaseVertex when supported?
gl.bindTexture(cmd.texture);
gl.drawElements(GL_TRIANGLES, count, gltype, indexBuffer.getPointer(offset));
gl.drawElements(GL_TRIANGLES, count, gltype, quadIndices.getPointer(offset));
}
}
+1 -1
View File
@@ -234,7 +234,7 @@ private:
bool useSpacesAsTab;
// Index buffer used for drawing quads with GL_TRIANGLES.
VertexIndex indexBuffer;
VertexIndex quadIndices;
// ID which is incremented when the texture cache is invalidated.
uint32 textureCacheID;
@@ -64,7 +64,7 @@ ParticleSystem::ParticleSystem(Texture *texture, uint32 size)
, pHead(nullptr)
, pTail(nullptr)
, particleVerts(nullptr)
, ibo(1)
, quadIndices(1)
, texture(texture)
, active(true)
, insertMode(INSERT_MODE_TOP)
@@ -113,7 +113,7 @@ ParticleSystem::ParticleSystem(const ParticleSystem &p)
, pHead(nullptr)
, pTail(nullptr)
, particleVerts(nullptr)
, ibo(p.ibo)
, quadIndices(p.quadIndices)
, texture(p.texture)
, active(p.active)
, insertMode(p.insertMode)
@@ -198,7 +198,7 @@ void ParticleSystem::setBufferSize(uint32 size)
{
if (size == 0 || size > MAX_PARTICLES)
throw love::Exception("Invalid buffer size");
ibo = VertexIndex(size);
quadIndices = VertexIndex(size);
deleteBuffers();
createBuffers(size);
reset();
@@ -888,8 +888,9 @@ void ParticleSystem::draw(float x, float y, float angle, float sx, float sy, flo
glVertexAttribPointer(ATTRIB_TEXCOORD, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), &particleVerts[0].s);
{
GLBuffer::Bind ibo_bind(*ibo.getBuffer());
gl.drawElements(GL_TRIANGLES, (GLsizei) ibo.getIndexCount(pCount), ibo.getType(), ibo.getPointer(0));
GLsizei count = (GLsizei) quadIndices.getIndexCount(pCount);
GLBuffer::Bind ibo_bind(*quadIndices.getBuffer());
gl.drawElements(GL_TRIANGLES, count, quadIndices.getType(), quadIndices.getPointer(0));
}
glDisableVertexAttribArray(ATTRIB_TEXCOORD);
+1 -1
View File
@@ -577,7 +577,7 @@ protected:
Vertex *particleVerts;
// Vertex index buffer.
VertexIndex ibo;
VertexIndex quadIndices;
// The texture to be drawn.
StrongRef<Texture> texture;
+6 -6
View File
@@ -47,7 +47,7 @@ SpriteBatch::SpriteBatch(Texture *texture, int size, int usage)
, next(0)
, color(0)
, array_buf(nullptr)
, element_buf(size)
, quad_indices(size)
, buffer_used_offset(0)
, buffer_used_size(0)
{
@@ -202,7 +202,7 @@ void SpriteBatch::setBufferSize(int newsize)
void *new_data = new_array_buf->map();
memcpy(new_data, old_data, sizeof(Vertex) * 4 * std::min(newsize, size));
element_buf = VertexIndex(newsize);
quad_indices = VertexIndex(newsize);
}
catch (love::Exception &)
{
@@ -241,7 +241,7 @@ void SpriteBatch::draw(float x, float y, float angle, float sx, float sy, float
gl.bindTexture(*(GLuint *) texture->getHandle());
GLBuffer::Bind array_bind(*array_buf);
GLBuffer::Bind element_bind(*element_buf.getBuffer());
GLBuffer::Bind element_bind(*quad_indices.getBuffer());
// Make sure the VBO isn't mapped when we draw (sends data to GPU if needed.)
array_buf->unmap(buffer_used_offset, buffer_used_size);
@@ -263,7 +263,7 @@ void SpriteBatch::draw(float x, float y, float angle, float sx, float sy, float
glVertexAttribPointer(ATTRIB_TEXCOORD, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), array_buf->getPointer(texel_offset));
gl.prepareDraw();
gl.drawElements(GL_TRIANGLES, (GLsizei) element_buf.getIndexCount(next), element_buf.getType(), element_buf.getPointer(0));
gl.drawElements(GL_TRIANGLES, (GLsizei) quad_indices.getIndexCount(next), quad_indices.getType(), quad_indices.getPointer(0));
glDisableVertexAttribArray(ATTRIB_TEXCOORD);
glDisableVertexAttribArray(ATTRIB_POS);
@@ -322,8 +322,8 @@ bool SpriteBatch::getConstant(UsageHint in, const char *&out)
StringMap<SpriteBatch::UsageHint, SpriteBatch::USAGE_MAX_ENUM>::Entry SpriteBatch::usageHintEntries[] =
{
{"dynamic", SpriteBatch::USAGE_DYNAMIC},
{"static", SpriteBatch::USAGE_STATIC},
{"stream", SpriteBatch::USAGE_STREAM},
{"static", SpriteBatch::USAGE_STATIC},
{"stream", SpriteBatch::USAGE_STREAM},
};
StringMap<SpriteBatch::UsageHint, SpriteBatch::USAGE_MAX_ENUM> SpriteBatch::usageHints(usageHintEntries, sizeof(usageHintEntries));
+1 -1
View File
@@ -138,7 +138,7 @@ private:
Color *color;
GLBuffer *array_buf;
VertexIndex element_buf;
VertexIndex quad_indices;
// The portion of the vertex buffer that's been modified while mapped.
size_t buffer_used_offset;