Of course, it takes some time to get the basics running. Until know it does only little (only perspective projection is covered), such as the transformation from an object's local space to actual screen space. But many things are left to do such as homogenous clipping, 2D clipping, painting ...
The things I want to implement as a next step are
- rasterization (lines via bresenham, basic filling - flat shading)
- homogenous clipping
- 2d clipping
- a primitive scene graph
- Enable double buffering for a control (e.g., Form) via setting a control's property DoubleBuffered = true
- Set a control's style via calling Control.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
- BufferedGraphics
- BufferedGraphicsContext
- BufferedGraphicsManager
Use a BufferedGraphicsContext.Allocate method to create a BufferedGraphics object and to render the contents of such a BufferedGraphics object to an output device use the BufferedGraphics.Render method, which allows you to set the desired output device or use the one supplied to the BufferedGraphics.Allocate method. Drawing to such an off-screen buffer is easily done via a BufferedGraphics.Graphics property.
Of course, if this is not what you want you may still use a Bitmap object to do all off-screen drawing and draw that bitmap to the display.
No comments:
Post a Comment