Article 6HJ9G error: �RenderSceneCB� was not declared in this scope 14 | glutDisplayFunc(RenderSceneCB);

error: �RenderSceneCB� was not declared in this scope 14 | glutDisplayFunc(RenderSceneCB);

by
Al99
from LinuxQuestions.org on (#6HJ9G)
Hi I am doing the tutorial at https://ogldev.org/www/tutorial01/tutorial01.html

I have the following code:

#include <GL/freeglut.h>
#include <GL/gl.h>

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowSize(1024, 768);
glutInitWindowPosition(100, 100);
glutCreateWindow("Tutorial01");
glutDisplayFunc(RenderSceneCB);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glutMainLoop();
glClear(GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}

I am linking with -lGL -lfreeglut

I keep getting the error : error: iRenderSceneCBi was not declared in this scope
14 | glutDisplayFunc(RenderSceneCB);

I googled it and found nothing to help the problem.

How do I fix it?

Thanks.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments