You are rendering into view.bmap , this bmap is screen size.
bmap_rendertarget
Quote:
Render target 0 can only be set when the view has no own render target (view.bmap), and can be switched off through bmap_rendertarget(NULL,0,0) for resuming normal screen rendering.

Could your error be the num var,
bmap_rendertarget(BmpMap,1,0);
NOT
bmap_rendertarget(BmpMap,0,0);

Edit more view.bmap
Quote:
The bitmap is automatically converted to a render target format and not accessible anymore for pixel operations. The view's pos_x/pos_y and size_x/size_y parameters define an offset and target area on the bmap. A7.10 For rendering into an environment map, set the view pos_x parameter to the pixel position of the beginning of the face you want to render into.

Last edited by Malice; 10/14/15 16:55.