Sign in to follow this  
luckyyyyyy

OpenGL urgent help please......

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
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

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