int level = 0;\r
int height = bitmap.getHeight();\r
int width = bitmap.getWidth();\r
- Log.d("texture", "creating texture mipmaps: " + bitmap.getWidth() + ", " + bitmap.getHeight());\r
\r
if (!MathUtils.isPowerOfTwo(bitmap.getWidth()) || !MathUtils.isPowerOfTwo(bitmap.getHeight()))\r
throw new GdxRuntimeException("Dimensions have to be a power of two");\r
level++;\r
if (height > 1) height /= 2;\r
if (width > 1) width /= 2;\r
+ Log.d("GDX", "Creating texture mipmap: " + width + ", " + height);\r
\r
Bitmap bitmap2 = Bitmap.createScaledBitmap(bitmap, width, height, true);\r
if (level > 1) bitmap.recycle();\r
graphics.updateTime();\r
input.update();\r
\r
- int width, height;\r
if (graphics.canvas != null) {\r
- width = graphics.canvas.getWidth();\r
- height = graphics.canvas.getHeight();\r
- } else {\r
- width = graphics.getWidth();\r
- height = graphics.getHeight();\r
- }\r
- if (lastWidth != width || lastHeight != height) {\r
- lastWidth = width;\r
- lastHeight = height;\r
- listener.resize(lastWidth, lastHeight);\r
+ int width = graphics.canvas.getWidth();\r
+ int height = graphics.canvas.getHeight();\r
+ if (lastWidth != width || lastHeight != height) {\r
+ lastWidth = width;\r
+ lastHeight = height;\r
+ listener.resize(lastWidth, lastHeight);\r
+ }\r
}\r
\r
listener.render();\r
}\r
\r
private static void loadLibrary (String libName, String classPath, String outputPath) {\r
+ if (new File(outputPath + libName).exists()) return;\r
+ \r
InputStream in = null;\r
BufferedOutputStream out = null;\r
\r
lastTexture = texture;\r
invTexWidth = 1.0f / texture.getWidth();\r
invTexHeight = 1.0f / texture.getHeight();\r
- }\r
-\r
- if (idx + length >= vertices.length)\r
+ } else if (idx + length >= vertices.length)\r
renderMesh();\r
\r
System.arraycopy(spriteVertices, offset, vertices, idx, length);\r