📄 wpw_w32_gui_95.html
字号:
<HTML>
<HR><A NAME=WIN32_GDI_FAST_ANIMATION>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: Fast Animation Under NT OPENGL</H4><PRE>
doug@OpenMind.com (Doug Cutrell) wrote:
>I am trying to develop an NT app with demanding animation effects. As
>far as I can determine, there is no way within the GDI to write
>directly into an offscreen buffer and bitblt it to the screen... all
>writes into an offscreen device context must proceed through system
>calls such as SetPixel, etc.
>
>However, I'm using a pre-OpenGL version of VC++, and so I'm wondering
>if there are new API's provided with OpenGL which will allow my app to
>write directly into an offscreen buffer which I can bitblt directly to
>the screen. Can anyone provide some guidance here?
>
>Basically, what I'm asking is: What's the best way to do fast
>animation under NT? I'm aware that Win '95 will have much better
>support for this, but I really would like my app to run under NT as
>well!
>
>
Do you mean, writing to a 'Z' buffer (holding an image in DRAM) of some sort?
If so, I would like to know also. You can do this in IDL, and it works great.
---------------------------------------------------------------------------------
Edmond Underwood
Systems Management Group
Computing & Network Services (University of Colorado)
E-mail: underwoe@Colorado.Edu
<HR>
In article <3rt71n$e56@lace.Colorado.EDU>
underwoe@Colorado.Edu "Edmond Underwood" writes:
> doug@OpenMind.com (Doug Cutrell) wrote:
> >...and so I'm wondering
> >if there are new API's provided with OpenGL which will allow my app to
> >write directly into an offscreen buffer which I can bitblt directly to
> >the screen. Can anyone provide some guidance here?
> >
> >Basically, what I'm asking is: What's the best way to do fast
> >animation under NT? I'm aware that Win '95 will have much better
> >support for this, but I really would like my app to run under NT as
> >well!
>
> Do you mean, writing to a 'Z' buffer (holding an image in DRAM) of some sort?
> If so, I would like to know also. You can do this in IDL, and it works great.
>
The Windows NT OpenGL API certainly supports double buffering, and its about
as simple to implement as you could imagine.
It also supports a 'depth buffer' which is described as 'a classical z-buffer
that is used in hidden surface removal'.
As to whether the buffered image is held in DRAM - Well, one would hope so as
the alternatives would make for a pretty unimpressive animation.
--
Paul Robertson
<HR>
There's a function in Win32, CreateDIBSection, which allows you to create
a chunk of memory as a DIB and write to it directly or draw on it with
GDI operations and then BitBlt it to the screen fairly quickly. On my
pentium 66 I can do a full screen BitBlt in about 20 or 30 ms.
The book by Nigel Thompson (Animation in Win32 or something like that)
discusses this, and there is some info in the Microsoft development
library. Under NT this function creates a shared memory area that you
can write to and that GDI can BitBlt from without any extra copy
operations which NT would otherwise force in the name of protection.
Paul Probert
</PRE>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -