我制造自己的2D发动机。 我计划刚刚利用网上绘画功能。 然而,这非常缓慢,屏幕爆发很多。 然而,我不得不把它引向一个窗口。
What is the best way to do this? How would I add buffers to the situation?
我制造自己的2D发动机。 我计划刚刚利用网上绘画功能。 然而,这非常缓慢,屏幕爆发很多。 然而,我不得不把它引向一个窗口。
What is the best way to do this? How would I add buffers to the situation?
假设你重新使用全球空间数据基础设施,“屏幕”热点问题是由于直接在主要表面书写。 你们可以通过创造“蓝图”缓冲,这样做:
Bitmap buffer = New Bitmap(Me.ClientSize.Width, Me.ClientSize.Height)
然后从该缓冲带中产生一个有管理的“北极”物体,
Using gfx As Graphics = New Graphics.FromImage( buffer )
// draw with gfx object
End Using
• 在主要表面展示最新的后方缓冲,例如:
Primary Graphics.DrawImage Unpand (buffer, 0, 0) or You can P/Invoke “,我认为这比以往更快。
如果你使用C# I,就会建议使用“unsafe”密码区块,直接通过点子操纵缓冲,从而可以加快速度。 然而,我不相信VB.net支持他们。
Edit:
GDI+ is not really going to be "blazing" fast no matter what due to the way it s implemented using standard system CPU / Memory resources.
您可使用SlimDX,后者在直接2D周围拥有一个管理包装器,一台硬件加速了2DPIC。 大约有tutorials 。 供启动。
Edit:
如果你坚持全球投资与发展倡议,你可以在你背后的缓冲地带使用“LockBits”进行一些“优化”记忆操作,here是关于这一主题的重要文章。
I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...
I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?
I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...
I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...
On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...
I have a relatively simple question regarding the best way to call the DataGridView.Rows.Add function when it is inherited into the current control. Which is the best way to make the call to the ...
I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?
Can I use two command object with one open connection in one procedure at VB.NET?