Re: [GtkGLExt] glViewport query



Hi ,

glViewport specifies the affine transformation of x and y from normalized
device coordinates to window coordinates and could be different than size of
the widget. Try setting it to (w/2 , h/2 ) and (2*w, 2*h) to see the
difference. You could zoom in or out using viewport with same widget size.
(0,0 ) is the lower left corner of the viewport  rectangle

~Prashant 


jyotigoyal wrote:
> 
> 
> Hi
> I am new to gtkglext trying to run some simple sample programs.
> In gtkglext, we create a drawing area as a widget and then set the size of
> the viewport using glviewport().Is the size of the drawing area not same
> as the size of the viewport? If not,then y? why would anyone make the size
> of drawing area and viewport different when viewport is also used to limit
> the size of drawing area?
> Also where is the coordinate (0,0) located on a window in this case?
> for gtk applications,it is located at top left corner.for gtkglext,where
> is it located? I am getting confused with the negative coordinates used in
> glviewport and glrectf and similar fns.
> 

-- 
View this message in context: http://www.nabble.com/glViewport-query-tp24425119p24425384.html
Sent from the Gnome - GtkGLExt mailing list archive at Nabble.com.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]