Just messing around today with dll's. it has box, dot, and bitmap drawing functions. the bitmap(soon to be bitmap and image) support transparency. and i had a 200x100 square and a about 100x100 image being drawn and it took less then 1 millisecond to work(printed 0) this is how it's working.
at the beginning you call InitDrawing() and it will get the backbuffer pointer then you can call AddPoint(), AddBox(), or AddBitmap() and specify position and colors. then when you call Draw() it locks the backbuffer and draws everything then unlocks it.
I am about to test it with the fps unlocked(i have to put some mp3's on this computer
) but i was having about 65 fps(the max lol) with the things stated above in a loop.
some might say this isn't very useful but i was bored
so I decided to do it. lol
here's the functions and the dll is attached. just wanted to see what fps other people got.
function InitDrawing()
lock backbuffer
width = get backbuffer width()
height = get backbuffer height()
depth = get backbuffer depth()
call dll 255,"?Init_Drawing@@YA_NPAKHHH@Z",Get backbuffer ptr(),width,height,depth
unlock backbuffer
endfunction
function Draw()
lock backbuffer
call dll 255,"?Draw@@YAKXZ"
unlock backbuffer
endfunction
function addpoint(x,y,color)
call dll 255,"?AddPoint@@YAHHHK@Z",x,y,color
endfunction
function AddBox(left,right,top,bottom,color)
call dll 255,"?AddBox@@YAHHHHHK@Z",left,right,top,bottom,color
endfunction
function addbitmap(x, y, bmp, trans)
make memblock from bitmap 255,bmp
Width = memblock dword(255, 0)
height = memblock dword(255, 4)
ptr = get memblock ptr(255)+12
size = get memblock size(255)-12
call dll 255,"?AddImage@@YAHHHPAKKHHH@Z",x,y,ptr,trans,size,width,height
delete memblock 255
endfunction
New Site! Check it out \/