#include "GLES-Render.h" #include #include #include #include GLESDebugDraw::GLESDebugDraw() : mRatio( 1.0f ) { } GLESDebugDraw::GLESDebugDraw( float32 ratio ) : mRatio( ratio ) { } void GLESDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int vertexCount, const b2Color& color) { b2Vec2* vertices = new b2Vec2[vertexCount]; for( int i=0;ilowerBound.x * mRatio, aabb->lowerBound.y * mRatio, aabb->upperBound.x * mRatio, aabb->lowerBound.y * mRatio, aabb->upperBound.x * mRatio, aabb->upperBound.y * mRatio, aabb->lowerBound.x * mRatio, aabb->upperBound.y * mRatio }; glVertexPointer(2, GL_FLOAT, 0, glVertices); glDrawArrays(GL_LINE_LOOP, 0, 8); }