Einlander Posted February 4, 2015 Share Posted February 4, 2015 I would like something like Context::DrawPoly( {table of Vec2()} ) While doing the 2d drawing, I found that using a scanline fill will IMMENSELY cripple the engine. if you scan-line draw (line by line) 3 squares on screen, you can see an fps drop from 200fps down to 40. and about 7fps if you use debug. This would help reduce the amount of code needed for gui libraries, and help raise the fps count. 1 Quote Link to comment Share on other sites More sharing options...
Olby Posted February 4, 2015 Share Posted February 4, 2015 Not sure if I follow... Are taking about filled rectangles? Its already possible with Context::DrawRect(int x, int y, int width, int height, int style=0). 1 should draw a filled rect. Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
Einlander Posted February 4, 2015 Author Share Posted February 4, 2015 I want a filled polygon. I want to feed it the points of a shape like a star, and have it fill it. 2 Quote Link to comment Share on other sites More sharing options...
Averice Posted February 6, 2015 Share Posted February 6, 2015 Polygon fill would be great it means I could port my gui to be rendered in 3d space easily! Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 6, 2015 Share Posted February 6, 2015 This find and conversion from Einlander seems to work just fine in Leadwerks: http://www.leadwerks.com/werkspace/topic/11746-2d-polygon-fill/ Edit - I see what Einlander is referring to - as you draw multiples it will drop the framerate significantly, but maybe not surprising as there are multiple loops occuring for each 'polyfillcontex' command. Granted if i wanted a star to be rendered i would just have an image drawn to a quad as it would be extremely cheap compared to any other method. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.