Hi Gerrit,
Thanks for your reply~~glutInitWIndowSize works~~
2009/6/12 Gerrit Voß <[email protected]>
>
> Hi,
>
> first part ;)
>
> On Fri, 2009-06-12 at 16:26 +0800, Jie Liu wrote:
> > Hi,
> >
> > My OpenSG version is 1.8.0. When I tried to test the
> > progs/Without_SSM.cpp program, I attempted to modify its code to get a
> > window of larger size:
> >
> > i.e, I did it in main() like this:
> > window->setSize(800, 800); // the parameters are originally set by
> > 300x300
>
> as OpenSG windows are just wrappers around the OpenGL parts you have
> to use the specific functions of your window system/toolkit to change
> the size of the window. E.g. if you are using glut either use/change
> glutInitWindowSize to the size you want or use glutReshapeWindow to
> achieve the same after the windows creation.
>
> > However, my window size did not change at all, and I tried to find out
> > the reason by adding a line of code in function reshape():
> > void reshape(int w, int y)
> > {
> > std::cout<<w<<","<<h<<std::endl;
> > ...
> > }
>
> actually inside this function should be a call to window->setSize so
> that OpenSG is told that the window size changed (we don't query for
> these changes).
>
> > I found that, every time when my application was started, the function
> > reshape was invoked by default, and set my window a size of 300x300,
> > So that's why my 'setSize' does not work~~
>
> > So how can I get a larger window as I wanted?
> >
>
> easiest is to change the code that creates your window toolkit window
> to use the size you want. E.g. for glut use
>
> glutInitWindowSize(800, 800);
>
> before you call glutCreateWindow.
>
> kind regards,
> gerrit
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
--
Jie Liu
Visualization Research Group
Center for Information Science, School of EECS,
Room 2104, Science Building No.2,
Peking University, Beijing 100871, China
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users