In order to minimize the amount of texture graphics I need to load, I was wondering how costly it would be to blit, for example, four (4) line segments together to form a square, like this:
buffer.blit(frameMap, frameXPos, frameYPos, xCoord, yCoord, frameWidth, 1, FrameBuffer.OPAQUE_BLITTING);
buffer.blit(frameMap, frameXPos, frameYPos, xCoord, yCoord+frameHeight, frameWidth, 1, FrameBuffer.OPAQUE_BLITTING);
buffer.blit(frameMap, frameXPos, frameYPos, xCoord, yCoord, 1, frameHeight,FrameBuffer.OPAQUE_BLITTING);
buffer.blit(frameMap, frameXPos, frameYPos, xCoord+frameWidth, yCoord, 1, frameHeight, FrameBuffer.OPAQUE_BLITTING);
Insted of blitting the square as a whole texture, like this:
buffer.blit(frameMap, frameXPos, frameYPos, xCoord, yCoord, frameHeight, frameHeight, FrameBuffer.TRANSPARENT_BLITTING);
When does the performance become noticable? In the extreme, I'd also be able to blit one pixel at a time from a loaded texture to draw a line, right? Would that be excessive? The way I see it it's a matter of trade off between performance and memory usage since minimizing the number of blit calls means that you need more specific texture graphics and therefore more memory. Please tell me if I'm way off on this :oops: