Solved

Quick Syntax Issue

Posted on 2003-12-10
3
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 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