openglSuperbibleの例のシャダーをプログラムに追加しようとしています。問題は、gltoolsから関数を呼び出すと、
glew32.lib(glew32.dll) : error LNK2005: _glewInit already defined in gltools.lib(glew.obj)
この後、glew32.libをglew32s.libと交換しました。その結果、で未処理の例外が発生しました
const M3DMatrix44f& GetMatrix(void) { return pStack[stackPointer]; }
追加したコード
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();
}
一緒に仕事をしようとすると
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);
Expression:OPENGLUT_READYでアサーションが失敗します
何が原因で、可能であれば解決方法を知りたいのですが、よろしくお願いします。