Hi,
I render my wolrd to the screen. Now I want my wolrd to be renderd to a texture FROM the screen.
ps. I can render the world to a texture and render that texture to the screen, but thats not what I want...
Hi,
I render my wolrd to the screen. Now I want my wolrd to be renderd to a texture FROM the screen.
ps. I can render the world to a texture and render that texture to the screen, but thats not what I want...
NecroSOFT - End of line -
Is this in OpenGL, SDL, DirectX, or what? In SDL this is easily done with SDL_SaveBMP(Surface, FileName) witch will return a 0 if it fails and >0 if it succeeds (if I remember properly). Same is true for OpenGL and DirectX, I just don't know the calls by heart
- Jeremy
http://www.eonclash.com/
I'm using DirectX.
It's not that I need to save it as a bitmap, I just want my world to be on a texture so I can add some calculations on it and render it back to the screen.
NecroSOFT - End of line -
Why can't you render the scene to the texture with the same dimensions as screen?
Edit: sorry misread your post
Peregrinus, expectavi pedes meos in cymbalis
Nullus norvegicorum sole urinat
I already do that. But somhow it gives some wierd results.Originally Posted by grudzio
See movie:
http://necrodome.homeftp.net/zooi/ScagBug.wmv
http://necrodome.homeftp.net/zooi/ScagBug2.wmv
If I render it directly to the screen, everything is just normal without the black stuff
NecroSOFT - End of line -
Have you tried to render to texture and render back to screen without any postproccessing? In my opinion there can be two possibilities - wrong texture format (i. e. pixel format) or something is wrong during postproccessing.
If it is not the case then I can't help you (I am OpenGL person). Have you looked at DirectX documentation? Maybe there you find something.
do you do something weird to the depth buffer? set alpha or something?
Peregrinus, expectavi pedes meos in cymbalis
Nullus norvegicorum sole urinat
Hi!
Have you cleared both color and depth buffer before rendering to texture? It is not always sufficient to render background, you need to clear color buffer manually.
Also, you will probably need to clear everything once when you are ready to render texture to screen.
blog: http://alexionne.blogspot.com/
I clear it when rendering to the texture and I clear everything when rendering the texture to the screen...
The blend mode used for tha particles is Invert Alpha or something.
When I use another blendmode everything is just normal. So it has nothing to do with the z-buffer....
Altrough it could be used to make some funny effects
NecroSOFT - End of line -
Bookmarks