# When to use ShapeRenderer & SpriteBatch in libGdx?

As a beginner(in GdxLib+Android), i found that for rendering particular screen, we can render that using both ways then when to use specific ones? & What is the best option for Updating the smaller part/region of the screen?

per documentation ShapeRenderer isn't efficient and shouldn't be used intensively.
• I want to know that suppose i have rendered the whole grid/screen using the Texture but now suppose i want to change the one rectangle area then what should i use... ? I am using code spriteBatch.begin(); spriteBatch.draw(texture, x,y,x,y); spriteBatch.end(); code but i failed to get change the rect. – vintesh Feb 21 '13 at 16:04
• @vintesh just to be sure, are you making that second call inside the draw() method? perhaps if you shared you code it would be easier to help. – petervaz Feb 21 '13 at 16:41