Chia-I Wu wrote: > On Fri, Jan 15, 2010 at 08:36:55AM -0700, Brian Paul wrote: >>>> If an OpenGL application does not call glViewport upon window resize, is >>>> it consider an application bug? >>> Yes, the OpenGL viewport isn't automatically adapted on a window resize. >> But it's not an application bug. >> I could write a GL program that never calls glViewport and still draws >> something meaningful before/after window resizing. > If I understand correctly, the application will draw to an old buffer if > a resize happened and it did not call glViewport. Right?
Are you talking about a specific driver, or in general? In general, it depends on how rendering finds its way to the buffer. If rendering to a surface goes through some kind of handle, reallocating the buffer doesn't change the handle so renering should go to the new buffer. > In that case, we need to call DRI2GetBuffers in buffer swap (for back > rendering) or flush frontbuffer (for front rendering), and copy the > contents of the old buffer to the new one at a suitable position. Off-hand I'm not sure what happens with DRI2. I could try to look later when I get some time. Anyone else know? But in the example I alluded to, my app would detect the resize (probably a ConfigureNotify event) and draw a new image and still not call glViewport(). Remember that glViewport() _only_ specifies an X/Y transformation of vertex coords from NDC to window space. It says nothing about the window size or clipping or anything like that. -Brian ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev