From: tomas c. <to...@db...> - 2004-05-03 23:48:00
|
Matt Sealey wrote: >>>If they are different, it inserts the new values into ctx->DrawBuffer, and >>>calls ctx->Driver.ResizeBuffers() - that way all the buffers suddenly become >>>the way Mesa expects (it asks the driver, makes sure it stores the correct >>>values, and then asks the driver to size appropriately). >> >>So if glViewport(0, 0, 1280, 1024) is called on a window which is only >>800 * 600 pixels, the window gets automatically resized? >>I don't think glViewport() should be able to resize the window. > > No. Well... if you say so > > If you call glViewport(0,0,1280,1024) then Mesa will clip to that and the > driver will be told to allocate a buffer of that size. The window will > stay the same, only the BUFFERS will change (imagine a window that > scrolls on the inside.. but with no scrollbars :) No matter how big the window is, the buffers are always allocated using the width/height provided by glViewport(). > > The times when you call glViewport() are.. when your window is resized > (for instance, glut Reshape callback). Usually, one sets glViewport() to the window size, not more or less. -- wereHamster a.k.a. Tom Carnecky Emmen, Switzerland (GC 3.1) GIT d+ s+: a--- C++ UL++ P L++ E- W++ N++ !o !K w ?O ?M ?V PS PE ?Y PGP t ?5 X R- tv b+ ?DI D+ G++ e-- h! !r !y+ |