- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case (int)Constants.WM_PAINT:
{
rh.Clear(DotGL.Color.Blue);
IntPtr hdc = User32.GetDC(this.Handle);
IntPtr chdc = Gdi32.CreateCompatibleDC(hdc);
int err = Marshal.GetLastWin32Error();
if (err != 0) ;
IntPtr ppv = IntPtr.Zero;
IntPtr hb = Gdi32.CreateDIBSection(chdc, ref q,
Constants.DIB_RGB_COLORS,
out ppv, IntPtr.Zero, 0);
ppv = rh.data.Scan0HGlobal;
Gdi32.SetDIBitsToDevice(hdc,
0, 0, (uint)q.biWidth, (uint)q.biHeight,
0, 0, 0, (uint)q.biWidth,
ppv, ref q,
Constants.DIB_RGB_COLORS);
User32.ReleaseDC(this.Handle, hdc);
FPS();
this.Text = "FPS: " + fps.ToString() + ", MAX FPS: " + maxFps.ToString();
} break;
default:
base.WndProc(ref m);
break;
}
}
Steve_Brown 20.08.2012 15:53 # +2
Dimonbl4 20.08.2012 23:56 # +1
wildscliss 21.08.2012 10:33 # 0
psina-from-ua 21.08.2012 12:38 # 0
bormand 21.08.2012 12:39 # +4
3.14159265 21.08.2012 12:43 # +1
vistefan 22.08.2012 22:09 # 0