PDA

View Full Version : GLUquadric warning



Athos
12-11-2008, 07:36 AM
hi all!
I'm working on a NeHe tutorial (lesson 26:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=26 ). When I build the demo (under Visual Studio) get the following warning: warning LNK4248: unresolved typeref token (01000017) for 'GLUquadric'; image may not run.
No errors are found, but the demo doesn't work fine: the sphere under the plane isn't "blended"!

this is the tutorial code:
GLvoid OglTab::DrawObject(GLvoid) { // Draw Our Ball
glColor3f(1.0f, 1.0f, 1.0f); // Set Color To White
glBindTexture(GL_TEXTURE_2D, texture[1]); // Select Texture 2 (1)
gluSphere(q, 0.35f, 32, 16); // Draw First Sphere

glBindTexture(GL_TEXTURE_2D, texture[2]); // Select Texture 3 (2)
glColor4f(1.0f, 1.0f, 1.0f, 0.4f); // Set Color To White With 40% Alpha
glEnable(GL_BLEND); // Enable Blending
glBlendFunc(GL_SRC_ALPHA, GL_ONE); // Set Blending Mode To Mix Based On SRC Alpha
glEnable(GL_TEXTURE_GEN_S); // Enable Sphere Mapping
glEnable(GL_TEXTURE_GEN_T); // Enable Sphere Mapping
gluSphere(q, 0.35f, 32, 16); // Draw Another Sphere Using New Texture
// Textures Will Mix Creating A MultiTexture Effect (Reflection)
glDisable(GL_TEXTURE_GEN_S); // Disable Sphere Mapping
glDisable(GL_TEXTURE_GEN_T); // Disable Sphere Mapping
glDisable(GL_BLEND); // Disable Blending
}

where is the problem for you?

Athos
12-11-2008, 08:43 AM
sorry
I found the problem!

changing static PIXELFORMATDESCRIPTOR pfd={.....16, 0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0};}
to static PIXELFORMATDESCRIPTOR pfd={.....16, 1, 0, PFD_MAIN_PLANE, 0, 0, 0, 0};}
the error disappeared (but the warning is still there :D )