Jump to content
  • Advertisement
Sign in to follow this  
andfol

Drawing sphere

This topic is 2471 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,

I am trying to draw a sphere in OpenGL using auxSolidSphere(.....); in a function:

void CSphereCollision::drawSphere()
{

glColor3f(0.0f, 0.5f, 0.5f);
glTranslatef(m_xPos, m_yPos, m_zPos);
auxSolidSphere(10.50);
}

with a constructor:

CSphereCollision::CSphereCollision(float val1, float val2, float val3): m_xPos(val1), m_yPos(val2), m_zPos(val3)
{

angle = 0.0f;
}

and a destructor that does nothing

I call it in main with an object with the values for position m_xPos, m_yPos, m_zPos passed into translate in the drawSphere function.
My problem is that I get an

fatal error LNK1120: 1 unresolved externals

error message when I compile.

Share this post


Link to post
Share on other sites
Advertisement
Post the error - "unresolved externals" means "you're missing some code that should be around here somewhere", and the text that follows that error will tell you what you're missing.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!