From 346d89d6710a8472458ff32a55801a0d1ce00119 Mon Sep 17 00:00:00 2001 From: Stanislav Ageev Date: Mon, 14 May 2012 18:07:59 +0300 Subject: [PATCH 1/2] Fixed label scale on retina devices --- isgl3d/primitives/Isgl3dPrimitiveFactory.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isgl3d/primitives/Isgl3dPrimitiveFactory.m b/isgl3d/primitives/Isgl3dPrimitiveFactory.m index 6e4de38..924c3fa 100644 --- a/isgl3d/primitives/Isgl3dPrimitiveFactory.m +++ b/isgl3d/primitives/Isgl3dPrimitiveFactory.m @@ -98,7 +98,7 @@ - (Isgl3dGLMesh *) UILabelMeshWithWidth:(unsigned int)width height:(unsigned int float uMax = contentSize.width / width; float vMax = contentSize.height / height; - Isgl3dGLMesh * labelMesh = [Isgl3dPlane meshWithGeometryAndUVMap:contentSize.width height:contentSize.height nx:2 ny:2 uvMap:[Isgl3dUVMap uvMapWithUA:0 vA:0 uB:uMax vB:0 uC:0 vC:vMax]]; + Isgl3dGLMesh * labelMesh = [Isgl3dPlane meshWithGeometryAndUVMap:contentSize.width * [Isgl3dDirector sharedInstance].contentScaleFactor height:contentSize.height * [Isgl3dDirector sharedInstance].contentScaleFactor nx:2 ny:2 uvMap:[Isgl3dUVMap uvMapWithUA:0 vA:0 uB:uMax vB:0 uC:0 vC:vMax]]; // GLMesh * labelMesh = [[Plane alloc] initWithGeometryAndUVMap:width height:height nx:2 ny:2 uvMap:[UVMap uvMapWithUA:0 vA:0 uB:0.5 vB:0 uC:0 vC:0.5]]; return labelMesh; } From 56494746725fc083472c88ce31c761654568f57f Mon Sep 17 00:00:00 2001 From: Stanislav Ageev Date: Mon, 14 May 2012 18:14:36 +0300 Subject: [PATCH 2/2] Force resize on views on first run to prevent wrong scaling --- isgl3d/core/Isgl3dDirector.m | 1 + 1 file changed, 1 insertion(+) diff --git a/isgl3d/core/Isgl3dDirector.m b/isgl3d/core/Isgl3dDirector.m index b64df9d..f935ded 100644 --- a/isgl3d/core/Isgl3dDirector.m +++ b/isgl3d/core/Isgl3dDirector.m @@ -342,6 +342,7 @@ - (void)stopAnimation { } - (void)run { + [self onResizeFromLayer]; [self startAnimation]; }