Sign in to follow this  
sapan3112

Global object constructors uses Run time computed values. Error

Recommended Posts

I(Beginner) am currently developing CARROM GAME in Cplusplus(C++) and OpenGL. All the geometric primitives are computed or initialized in terms of WINDOWSIZE(getGlut-SCREEN Height) which will only available after glutInit() call in main(). Now my problem is that I needed to declare some class objects as global to keep up with game life-time. Now error is that we can't use getGlut(Screen-height) before glutInit(). Plz someone give some clue.

Share this post


Link to post
Share on other sites
Yeah, that I can do to have uniform display. But I wanted to do that exactly using resolution of system. For the time being I am using 1024 as window size parameter and other computation which is perfect for my system. But is that perfect for some other systems as well?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this