Same scene to multiple viewports?

graphics

    Next

  • 1. gluNurbsSurface not rendering nearly flat surfaces
    Hi, I'm on Windows2000 using the libraries supplied by Microsoft. I'm having a problem with some surfaces not rendering with gluNurbsSurface. All of the surfaces showing this problem are nearly flat and untrimmed. No error is produced; they just don't draw. If I reduce the number of control points I can get them to draw, so apparently too much definition is a problem. I'm also having a problem with some surfaces producing a "knot multiplicity greater than order of spline" error which I asked about in a previous post (see "NURBS Error from gluNurbsSurface (knot multiplicity)" from June 3). I googled through the archives for this newsgroup and didn't find anyone else mentioning either of these problems. I find it hard to believe I'm the only one. I'm starting to get a pursecution complex. Most other surfaces render fine, so I don't think I'm doing anything grossly wrong. Are these known problems? If anyone is interested in trying to render with my data I can post data for one of the No-Render-But-No-Error surfaces. The smallest is 4x12 control points. However, the Knot-Multiplicity-Error surfaces are far too large to post here, but I might be able to arrange a download location from our Web site. Let me know. Thanks much, John
  • 2. Antialiasing & vsync
    Hello list, I'd like to tweak params for rendering. 1/ I'd like to activate or deactivate hardware anti aliasing, is there a way to let the app control such things ? 2/ I'd like to activate or deactivate vertical sync ... same question 3/ I'd like to specify monitor refresh rate. Actually, whatever resolution I choose, it runs at 60Hz (it may be different on monitors others than mine thoug), is it possible ? Thank you for helping me, SeksaPeel.
  • 3. Teapots ... Always teapots ...
    Do someone know where i can find a 'teapot source code' in C/C++ ? A function with several parameters but not an array with only vertex position, face index ... Thanx

Same scene to multiple viewports?

Postby Michael » Thu, 31 Aug 2006 05:43:21 GMT

Hi all,

I'm basically new to this group, posted a msg over a year ago but
that's it.

I'd like to display a *copy* of my rendered scene in two viewports -
one on my laptop screen for monitoring, and the other to an external
monitor for display. Does anyone know how I can do this without having
to render each frame twice? The typical use for multiple viewports is
to display multiple views from *different* angles or other settings
that require a re-rendering of the scene, but I don't need that, so
don't want to take the cpu/gpu to render the scene twice if I don't
have to.

Thanks for any tips!

Cheers,
Michael


Re: Same scene to multiple viewports?

Postby Wolfgang Draxinger » Thu, 31 Aug 2006 07:17:35 GMT




Let both render contexts share and create a 3rd PBuffer context.
Render the scene in the PBuffer and use this PBuffer as a render
to texture source in both contexts to render a textured quad,
with the PBuffer bound to the texture.

Wolfgang Draxinger
-- 
E-Mail address works, Jabber:  XXXX@XXXXX.COM , ICQ: 134682867
GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E

Re: Same scene to multiple viewports?

Postby Cubitus » Thu, 31 Aug 2006 08:02:33 GMT

Michael wrote :

Where exactly do you plug that 2nd monitor, if not on the VGA connector 
at the back of your laptop?

Now I would suppose that by default, the video adaptor sends a copy of 
the signal to that VGA connector, or at worse would disable the laptop 
screen when there's something plugged. But then, it's just a matter of 
video driver configuration, you don't need to change anything at the 
OpenGL level.

And then again, it's pretty late, maybe I just didn't understand your 
problem to begin with, and I've just made a fool of myself :-)


Re: Same scene to multiple viewports?

Postby fungus » Thu, 31 Aug 2006 08:11:26 GMT



You might have to press one of the "function" buttons
on the laptop.


-- 
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address


Re: Same scene to multiple viewports?

Postby Michael » Thu, 31 Aug 2006 23:23:11 GMT





Thanks Wolfgang, that sounds like the thing to do.

Regarding the other replies, I can't just use a screen "clone" mode for
the external monitor, because I need some gui windows up on the laptop
monitor, and then my rendered scene in a small window next to the gui.

Cheers,
Michael


Re: Same scene to multiple viewports?

Postby Wolfgang Draxinger » Fri, 01 Sep 2006 01:17:09 GMT




One thing to mention though: The context sharing will only work
if both contexts are handled by the same GPU. The API allows
inter GPU sharing, but you will inevitably fall into software
rendering. In such a case it's better not to share and to create
PBOs on each context, which use all the same part of the CPU
memory - this requires the slower read/write volatile acces
though.

Wolfgang Draxinger
-- 
E-Mail address works, Jabber:  XXXX@XXXXX.COM , ICQ: 134682867
GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E

Similar Threads:

1.Multiple Viewports

I'm working on a program used for pretty detailed model visualization. 
Recently emerged the need for multiple views, each with a different 
angle of the model. I'm using multiple viewports in a single window and 
I'm not sure that I'm doing it right. I've got 6 viewports, all showing 
the same model. When drawing, I go through every viewport and render the 
  same model over and over in each viewport respectively. This, of 
course, slows the frame rate 6 times. Now, this just doesn't seem right, 
having to feed the opengl with model coordinates just to have a 
different viewing angle. Is this the right way to do it?
I don't think this is important, but model is made of approx. 150000 
polygons, so around million polygons shouldn't be a problem. I've got a 
pretty good graphics card, but it's still jerky.

Any help is appreciated,
thanks,
Killroy

2.multiple viewport problem with bitmap

Hi everyone,

I am trying to use OpenGl with C++ and am having problems with multiple
viewports. The problem happens when I try to display bitmaps in twp
different viewports.

I tried various combinations. The code seems to behave when I am
drawing triangles etc. However, when I try doing something with
bitmaps, it fails.

Here is the code in a nutshell:

glMatrixMode(GL_MODELVIEW);
glViewport(m_xPos, m_yPos, m_width,m_height);
glLoadIdentity();
glDrawPixels(bmp.bmWidth, bmp.bmHeight, GL_BGR_EXT, GL_UNSIGNED_BYTE,
bmp.bmBits);

// same code, but different set of values for the position...
glMatrixMode(GL_MODELVIEW);
glViewport(m_xPos, m_yPos, m_width,m_height);
glLoadIdentity();
glDrawPixels(bmp.bmWidth, bmp.bmHeight, GL_BGR_EXT, GL_UNSIGNED_BYTE,
bmp.bmBits);

SwapBuffers(hDC);

Now, the two bitmaps seem to get drawn on the same viewport... I would
appreciate any help anyone can give me regarding this...

Cheers,
xargy

3.multiple viewports .... same texture

Hello,
I'm trying to optimize my current program, which consists of 5 viewports 
displaying the same object from different angles. The problem I have is 
that I'm loading a texture which is quite large, too large to be loaded 5 
times. At the moment I have 5 QGLWidgets under QT, each one with its own 
initGL and paintGL methods and each one loading its own copy of the same 
texture and displaying it in a different way.

In a first attempt to optimize the display, I've tried using the  
glBindTexture(GL_TEXTURE_3D_EXT,1) command before the glTexImage3DEXT(....) 
command in each widget and again before painting the texture in each 
widget. So, theoretically, the texture should get loaded once to a texture 
object, then get written over 4 times by the subsequent initGL calls, and 
then it should get used by the paintGL's each time.

The problem is it doesn't seem to work. It still loads the textures 5 
times. I know this, because for one, there is a sharp performance decrease 
when the textures don't all fit in the memory (one copy does, 5 don't). 
Secondly, in the initGL I added something like this before/after the 
texture loading command. The subsequent viewport display a white texture, 
i.e. they're not using the one that was loaded:

if (first time called in program){
    glBindTexture(GL_TEXTURE_3D_EXT,1);    
glTexParameteri(GL_TEXTURE_3D_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexImage3DEXT(GL_TEXTURE_3D_EXT, 0, GL_LUMINANCE_ALPHA,
		    sizex,sizez,sizey,
		    0,
		    GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, data);
}

Maybe the qtwidget does something so that the openGL contexts don't affect 
each other, so the glBind has no effect....

Also, does anybody know of a way to check how much texture memory is 
available?

Thanks for the ideas

4.Multiple overlapping viewports

How can I make two viewports, one of them covering all the window
client area and another one covering a small recrangle near a corner?

Thanks in advance.

5.Multiple scenes & cameras

Hi,

I am using two cameras to render two (sub-)scenes on the same screen. 
This way, I can independantly select the orientation/position of the 
camera for each subscene. Everything is perfect ... except that I'd
like the second subscene to be always rendered on the top of the 
first.

Any hint ?

Regards,

S.B.

6. Drawing to one scene with multiple classes.

7. Simple question about multiple lights on a scene

8. Multiple Scene Render



Return to graphics

 

Who is online

Users browsing this forum: No registered users and 58 guest