Thank you for chiming in. Thread is not too old, i have neither solved, nor given up on the idea i have (just haven't got developing on it - i have small list of things i work on, on and off).
I did think of scan-line rasterizing (it's not hard but will have to be careful with degenerate cases, like all 3 vertices on same horizontal line + alpha blending). Initially i was concerned that when i am working in non-native resolution (say if i use roScreen is 854x480 when player is in 720p or 1080p mode), that will lead to triangles turning into horizontal stripes, with gaps forming between the horizontal lines i draw due to zooming. I did not find discussion anywhere how the scaling is done - it could be vector or bitmap-wise, with different outcomes. I still don't know for sure and since it is not documented, it can potentially change (?!).
But performance is my biggest concern - as an idea of speed i would hope to be able to draw something like this spinning tetrahedron:
<snip>
My gut feeling is line-by-line won't be able to. Was your routine close to such speed, ballpark?
bump bump bump ( better late than never )
why alpha blending? isn't alpha on roku 2D compositing alpha only? my memory is kinda fuzzy on alpha in 3D, but I vaguely rem it has something to do with raycasting, no?
anyway, I bring it up as it might be a bottleneck. (maybe. maybe not.)
as for performance, try this:
http://bloggingwordpress.com/2012/08/ro ... ster-demo/and for those too lazy to click on the link, instead of real-time, why not have your triangle render engine be an offline one, creating sprite sheets for you at load time?
"rokujoel" wrote:
“can we draw to a bitmap directly and then show that bitmap?”
Effectively, drawing to a bitmap is the same operation as drawing to the screen – the screen is sort of a giant bitmap, pretty much anything that works on the screen will work to a bitmap, I believe you will need to call bitmapname.finish() after drawing to bitmaps, just like to the screen,(weird stuff can happen if you don’t) or possibly bitmapname.swapbuffers() under double buffering situations (not sure if bitmaps other than the screen can be double buffered).
but I'll be bold and say
YES! that is possible, with backface culling ( alpha issue? ), I totally believe a Roku 2 can draw 2 (flat shaded) Triangles in realtime using BrightScript*... but probably not much else.
😉 * disclaimer, I'm not even going to guess what the FPS would be.