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