1
OpenGL Superbible 예제에서 쉐이더를 프로그램에 추가하려고합니다. 문제는 내가 gltools에서 어떤 함수를 호출 할 때 내가 glew32s.lib와 glew32.lib 교환이 후glew 및 gltools 문제, _glewInit이 이미 정의되었습니다.
glew32.lib(glew32.dll) : error LNK2005: _glewInit already defined in gltools.lib(glew.obj)
를 얻을 수있다. 즉, 표현에 실패
const M3DMatrix44f& GetMatrix(void) { return pStack[stackPointer]; }
내가 주장을 얻을
GLfloat modmatrix[16], projmatrix[16];
glGetFloatv(GL_PROJECTION_MATRIX, projmatrix);
glGetFloatv(GL_MODELVIEW_MATRIX, modmatrix);
//M3DMatrix44f
float MDWPRJMatrix[16];
m3dMatrixMultiply44(MDWPRJMatrix, modmatrix, projmatrix);
glUniformMatrix4fv(locMVP, 1, GL_FALSE, MDWPRJMatrix);
와 아루를 작동 할 때 나는
void Shadders::RenderScene()
{
static CStopWatch rotTimer;
// Clear the window and the depth buffer
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
modelViewMatrix.PushMatrix(viewFrame);
modelViewMatrix.Rotate(rotTimer.GetElapsedSeconds() * 10.0f, 0.0f, 1.0f, 0.0f);
GLfloat vColor[] = { 0.1f, 0.1f, 1.f, 1.0f };
glUseProgram(flatShader);
glUniform4fv(locColor, 1, vColor);
glUniformMatrix4fv(locMVP, 1, GL_FALSE, transformPipeline.GetModelViewProjectionMatrix()); // The line that causes the unhandled exception
torusBatch.Draw();
modelViewMatrix.PopMatrix();
glutSwapBuffers();
glutPostRedisplay();
}
을 추가하는 코드에서 처리되지 않은 예외 결과 : OPENGLUT_READY
이 문제의 원인을 알고 싶습니다. 가능한 경우 해결 방법은입니다.미리 감사드립니다.