I'm not sure what you want: In your first post you want to render the object on your bitmap white (render-to-texture), now you want a function? Those two approaches are quite different..