Jump to content
  • Advertisement
Sign in to follow this  
luckyyyyyy

OpenGL urgent help please......

This topic is 3657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi... my problem with glutBitmapLength.... i am working on two opengl projects in visual studio 2008 ... --------------------------- in one project glutBitmapLength is working fine... example: int f_cord_x; f_cord_x = (w - glutBitmapLength(GLUT_BITMAP_HELVETICA_10, "boton"))/2; --------------------- ok when i copy and paste this code to another project then visual studio shows an error.. error C2664: 'glutBitmapLength' : cannot convert parameter 2 from 'char *' to 'const unsigned char *' ------------------------------- its sooooooooo confusing for me...means same glut, same compiler then why it is happening.. i spent a lot of time to correct this problm but i unfortunately couldn't... what's the problem...how can i correct this error... please suggest me... thanks.. [Edited by - luckyyyyyy on September 20, 2008 1:44:38 PM]

Share this post


Link to post
Share on other sites
Advertisement
I have done it...just placing the (unsigned char*) before the second argument of glutBitmapLength...

f_cord_x = (w - glutBitmapLength(GLUT_BITMAP_HELVETICA_10, (unsigned char*) "boton"))/2;

-----------

its working now...but i don't know whats the problem in one project is working without (unsigned char*)....

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!