Relationship between client rectangles and glTranslate floats
hey,
I am just trying to plot a complex line graph in openGl and am wondering is there any relationship between a client rectangle and a GLTranslate?
I have set the viewport to the client rectangle, can I start drawing from the side of the screen?
What I draw does not show so obviously is not in the viewport.
I hope this makes sense as I am only new to actually writing gl code.
cheers,
Ech
If you are ploting graph then I guess you are using Ortho mode. Before you translate anything (0, 0) is in bottom left corner of the viewport. So everything starts in that corner...
Yep you''re right, you need to set up your view port using the client area dimensions, and not the usual window frame dimensions. Unless you tinker with the parameters, you should also realize (as the previous poster mentioned) that the origin (0,0) will be located at the bottom left corner of the window''s client area.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement