Functions not being initialised onKeyDown

Posts: 1
Joined: 2014.04
Post: #1
Hey everyone,

Sorry if this has been answered before. For some reason my functions aren't being initialised properly in my switch statement within glutKeyboardFunc. I have debugged glutKeyboardFunc to see if it is initialising my keyDown, and it is.

Here is my code:
void keyDown(unsigned char key, int x, int y)
   /*Switch to filled mode or line mode*/
    case 'o':
      drawn = !drawn;
    case 'n':
      printf("N pressed\n");


These functions are located above keyDown() in terms of layout. I assume this is happening because of placement of the functions themself.

[Image: QVJdXcW.jpg]

Thanks for any help
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
From your console log, it’s clear this function is in fact being called, so what exactly is the problem?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Some quick help getting started with certain Carbon functions zmwworm 12 13,499 Jan 10, 2008 01:14 AM
Last Post: zmwworm
  Intel Mac -> Many Warnings (deprecated functions) dave05 3 7,253 Sep 6, 2006 03:19 PM
Last Post: aarku
  Arrays or variables containing executable functions Jones 4 7,660 Jun 2, 2006 08:35 AM
Last Post: Zekaric
  Struct based functions Jones 9 10,175 May 9, 2006 02:37 PM
Last Post: Zekaric
  Using OpenGL 1.5 functions ermitgilsukaru 8 11,828 Nov 14, 2005 08:41 PM
Last Post: ermitgilsukaru