Creating a window bigger than the screen resolution

  1. Is it possible to create an OpenGL window bigger than the size of the monitor resolution ? If so how and using what ?

  2. Using Cg / GLSL how can I write to multiple color buffers from inside the fragment shader in one pass ? In a single pass inside the fragment shader I will be processing a fragments color in 4 different ways. So essentially I will be getting four different color values. Now I want to write each color value to its corresponding color buffer. What extensions will I need for this ? I can think of MRT extensions like ATI_draw_buffer. It would be good if I could use more than 4 rendering targets.

  3. To make it more interesting, I would also like to make the above rendering targets (multiple color buffers) to be render-to-texture targets. So instead of rendering to multiple color buffers inside the frame buffer, I could render to multiple targets but now the targets would be color textures. Also I want to use floating point textures/render targets.

Lot of crazy ideas but I really would appreciate some feedback on this. Thank you!

I am using NVIDIA QuadroFX 3000.

Of course you can create a window with arbitrary dimensions, but you should be aware of the fact that non-visible parts of the window will always contain undefined data when reading back (just in case you planned using commands like glCopyTexImage).

  1. and 3)
    You should have a look at the EXT_framebuffer_object extension. With it rendering to textures is really easy, and it supports up to 16 color buffers (theoretically, but I don’t know what hardware you need to actually use them all). It should also work with floating point textures.

It is currently only implemented in NVIDIA 75.90 drivers, and the implementation seems a bit buggy (see thread in the advanced coding forum).

  1. Use pbuffers or fbo when it come.

  2. If your card support ARB_draw_buffers or ATI_draw_buffers then you can. Check for max number of buffers. I think it is 4 on latest hw. In glsl instead writting output to gl_FragColor use writting to gl_FragData[n]. This feature are known as MRT (multi render target)

  3. Yes, you can if you use pbuffers or fbo. Read spec and do google for RenderTexture2 class. It is excellent wrapper for whole pbuffer thing. And be aware… When you use MRT all buffers must be same pixelformat. Mixing pixel formats are not allowed.

yooyo

1.) No, OpenGL has an implementation dependent limit of GL_MAX_VIEWPORT_DIMS.
P-Buffers can have different sizes than your window and will pass the pixelownership test.
FBOs are probably better.
For bigger sizes you can render in tiles.
http://www.mesa3d.org/brianp/TR.html

2.) GLSL supports gl_FragData[n] instead of gl_FragColor with n the index of your MRT color buffer. You need this extension or it won’t work:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/draw_buffers.txt
Edit: Double post. What he said ^^^^.

Thanks guys!

I have ATI_draw_buffers but no ARB_draw_buffers and the maximum number of draw buffers my card supports is only 4.

I am using NVIDIA QuadroFX 3000.

I am using 70.78 drivers. That is the latest certified driver I could find. If I had drivers for EXT_framebuffer_object that would have been easy to use than the pbuffer and render texture extensions.

If anyone knows of any drivers that support EXT_frambuffer_object please post a message.

First (and one & only at this time) driver that support FBO is 75.90. It is “heavy” beta and FBO has some limitations and small bugs. If you still want to play with this toy, dl it from www.guru3d.com.

Guys from nvidia promise first regular rel. 75 driver in March. So… March is here… and we have to wait…

yooyo

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.