Home » Developing U++ » U++ Developers corner » Drawing Question
Drawing Question [message #4934] |
Sat, 26 August 2006 19:46 |
|
when look into the Paint routine of TreeCtrl and ArrayCtrl,strange to see when drawing a line,DrawRect is used not DrawLine,so why,can someone teach me this?
[Updated on: Sat, 26 August 2006 19:48] by Moderator Report message to a moderator
|
|
|
Re: Drawing Question [message #4935 is a reply to message #4934] |
Sat, 26 August 2006 22:24 |
|
hongdong wrote on Sat, 26 August 2006 13:46 | when look into the Paint routine of TreeCtrl and ArrayCtrl,strange to see when drawing a line,DrawRect is used not DrawLine,so why,can someone teach me this?
|
Because is faster to draw a rectangle than a line on most gpus. If you simulate drawing horizonal and vertical lines using recangles gpu dosn't have to calculate bresenham factors and can optimize memory writes - whatever that could mean (because it knows that gfx memory will be accessed lineary).
|
|
|
Goto Forum:
Current Time: Sun May 05 16:07:35 CEST 2024
Total time taken to generate the page: 0.02751 seconds
|