Показать сообщение отдельно
Старый 16.08.2011, 23:16   #251
dsd
Мастер
 
Аватар для dsd
 
Регистрация: 13.06.2011
Сообщений: 1,103
Написано 481 полезных сообщений
(для 1,836 пользователей)
Ответ: Имитация водной поверхности.

okey



BBDECL void BBCALL xCreateDSS ( int width,
int height
)

Creates a depth-stencil surface.

Depth-stencil surface is used for z-buffer technique. It's used to write the scene depth for clipping invisible pixels. By default DSS is used with backbuffer dimensions, but if you want to render to larger textures you must create DSS with an appropriate dimensions. E.g. if you use 800x600 mode, default DSS will be 800x600 too. If you want to render to 1024x1024 texture (e.g. for shadows), you must call xCreateDSS(1024, 1024) to make things work.

Parameters:
width Depth-stencil surface width
height Depth-stencil surface height
Захотелось мне нарисовать вершины на мешах, а те из них которые не видимы, что бы не рисовать. И захотелось мне читать для каждого пикселя его з-буффер. Как?


Какая интересная функция
BBDECL void BBCALL xSetRenderWindow ( HWND window )

Sets the window for rendering.

It may be used by map editor or other tools to render into some gadgets.

Parameters:
window Pointer to rendering window
(Offline)
 
Ответить с цитированием