Solved

Quick Syntax Issue

Posted on 2003-12-10
3
476 Views
Last Modified: 2013-12-06
I have the following code:
===============================================

#include "globals.h"
#include "ftApp.h"

#include <GL/glut.h>


ftApp::ftApp(int argc, char **argv)
{
      // Standard GLUT init
      glutInit(&argc,argv);
      glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
      glutInitWindowSize(WINDOW_START_WIDTH, WINDOW_START_HEIGHT);
      glutCreateWindow(WINDOW_TITLE);

      // GLUT callback functions
      glutDisplayFunc(ftApp::DrawScene);

      this->SetupRenderContext();
}


void ftApp::SetupRenderContext(void)
{
      glClearColor(CLEAR_COLOR);
}


void ftApp::Start(void)
{
      glutMainLoop();
}


void ftApp::DrawScene(void)
{
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      glutSolidTeapot(0.5);
}

===============================================

On compile, following error occurs:

...\ftApp.cpp(16): error C2664: 'glutDisplayFunc' : cannot convert parameter 1 from 'void (void)' to 'void (__cdecl *)(void)'

===============================================

I think it is obvious what I am trying to do.  How do I do it?

Thanks,

Justin
0
Comment
Question by:newstandard
  • 2
3 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9918099
0
 
LVL 24

Accepted Solution

by:
shivsa earned 250 total points
ID: 9918101
0
 

Author Comment

by:newstandard
ID: 9918247
wow, that is awkward

but, it works :-)

thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now