First, I was reading through the chapter on buffers in "OpenGL Game Programming" by Hawkins and Astle, and got past the part where he talked about the accumulation buffer. He gave a quick example of how to use it for motion blur, and I tried to put this into effect on Nehe Lesson 6. Here''s the code:
int DrawGLScene(GLvoid) // Here''s Where We Do All The Drawing
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT); // Clear The Screen And The Depth Buffer
glLoadIdentity(); // Reset The View
glRotatef(objectAngle - (float)idx,0.0,1.0,0.0);
return TRUE; // Keep Going
Now, it just creates a slightly blurred, discolored cube that doesn''t move and slows down the program. Any idea on how to get it actually moving with the motion blur?
Second, I was compiling some of the programs from the Nvidia OpenGL sdk, and I get this linker error:
error LNK2019: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ) referenced in function "private: bool __thiscall std::basic_string,class std::allocator >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z)
What library am I forgetting to link?