Render larger than screen?
Blitz3D Forums/Blitz3D Programming/Render larger than screen?
| ||
Dear peoples, I want to render a camera that's potentially larger than the screen as set by Graphics3D(). After checking the forums, etc. I guess the 'only way' to do this in b3b is rendering it straight to a texture first - which I can then display on screen zoomed/scaled or cropped (or save to disk). There's talk about Tom's lib and FastExt, but they sound quite 'rough around the edges'. Are there any methods, libraries or sample code that can do this ACCURATELY ie. 'pixel perfect'?!? It would have to work on any resolution (up to a reasonable maximum of course) like 800x387 or 2077x1103 pixels for example..? Any hints massively appreciated! Danny. |
| ||
you can only have textures with sizes of power of two square. And 2077 will not work on most graphic cards, thats a 4096 square texture. Only newest generation of ATI and NVIDIA support that, beside the problem that you have 64MB of VRAM in that single texture bound. |
| ||
I'm don't think 2077x1103 can work. In DX7 nothing gets bigger than 2048. |
| ||
thats incorrect DX7 supports anything your card supports. But you won't find any cards until HD series on the ati end that supports more than that. On the NVIDIA end, GF6+ is 4096 and higher so yes, you physically wouldn't go higher as that texture already is 20MB VRAM (2048 square) |
| ||
You can't render to a texture can you? I've always had to render to the backbuffer then copy. Which means you can't go bigger than screen size. I'd LOVE to be wrong. |
| ||
Yes you can render to texture. Either Toms dx7test.dll or fastextends. They will allow you to create textures as render targets. On current gen real 3D cards the performance by the way is the same if you do render 2 texture or render to backbuffer and copyrect to a flag 256 texture. The shader driven FFP does not seem to handle them differently. On old and crap (Intel) cards thought you get a speedup of up to 6 times higher FPS by rendering directly to the texture instead of backbuffer and copy |
| ||
Thanks for the comments. Ok, so if 2048x2048 is the maximum, I can live with that. It's for a paint-program style editor, not a game, so hardcore perfomance is not so much an issue. I guess that after rendering to texture, I can convert it to an image and crop it to anything (smaller) I want - like some odd resolutions such as 1934 x 1088 for example. But using FastExt or Tom's dll, could I render to a 2K texture whilst the screen is just configured at 800x600 for example?? D. |