🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

render surface functionality

Started by
0 comments, last by dirtydevil 24 years, 7 months ago
The render surface is like a buffer or like a backbuffer surface? Have I must to do a flip? How to mix 2d images with my 3d enviroment?
http://www.stas.net/rafael/icq: 11915640
Advertisement
Hello dirtydevil

The render surface can be a backbuffer or an offscreen buffer, just as you want it to work. You can use Flip if you create your surfaces with one call to CreateSurface (specify COMPLEX FLIP 3DDEVICE and PRIMARYSURFACE flags in DDSCAPS). Or you can make a primary surface and an offscreen plain surface. The offscreen plain surface then has to be created with the 3DDEVICE flag and will be blitted to the primary surface using Blt or FastBlt. Just as you want.

To mix 2D and 3D just simply use the backbuffer to Blt on. You can Blt anything what you want but beware that you first Blt your 2D surfaces and then render your 3D stuff. Otherwise your 3D things won't be visible because they will be overblitted by your 2D surfaces.

VirtualNext

This topic is closed to new replies.

Advertisement