Turbesz Posted January 11, 2021 Share Posted January 11, 2021 I want to draw blips on radar with render target, but blips are does not appears, and the arrow blip with render target appears outside of the radar.. I want to show all blips with rendertarget, and like map image, the blips comes out from radar frame, when we are approaching to blip position (that's why it should be use dxSetRenderTarget). But does not work. the code: --render target: rt = dxCreateRenderTarget(200, 400, true) --draw dxSetRenderTarget(renderImage,true) dxDrawRectangle(0,0,size2,size2,tocolor(88, 108, 137,255)) dxDrawImageSection(scx,scy,scw,sch,mx,my,mw,mh,texture,0,0,0,tocolor(255,255,255,255)) dxSetRenderTarget(newtarg,true) dxDrawImage(size/2,size/2,size2,size2,renderImage,rot,0,0,tocolor(255,255,255,255),false) for _,v in ipairs(blipimages) do dxSetRenderTarget(rt,true) local bx, by = size*1.5+v[1]-x,size*1.5+v[2]-y local alpha = 255 dxDrawImage(bx,by,v[3],v[4],v[5],v[6],0,0,tocolor(255,255,255,255),false) dxSetRenderTarget() dxDrawImage(radarPos[1]-7, radarPos[2]+19, 200, 400,rt, 0, 0, 0, tocolor(255,255,255,200)) end dxDrawImage(size*1.5-(blipDimension*0.75)/2,size*1.5-(blipDimension*0.75)/2,23,23,"files/arrow.png",rot-prz,0,0,tocolor(172,211,115,255),false) dxSetRenderTarget() blipimages={} Link to comment
Addlibs Posted January 11, 2021 Share Posted January 11, 2021 (edited) rt = dxCreateRenderTarget(200, 400, true) --draw dxSetRenderTarget(renderImage,true) Did you mean rt instead of renderImage in dxSetRenderTarget? Edit: Nevermind, I see dxSetRenderTarget(rt,true) in a different place. Edited January 11, 2021 by Addlibs Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now