• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Redisplaying the Window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Redisplaying the Window


  • Subject: Redisplaying the Window
  • From: Adam <email@hidden>
  • Date: Fri, 15 Dec 2006 20:39:40 -0800

Hello everybody,

In redisplaying a window, I made this function. It gives me two errors, and I'm wondering if it's because I'm just using these functions wrongly. I'm new(ish) to Xcode, so I'm probably just using the functions from my old compiler. Please just tell me what is wrong so I can fix it, write notes, and know what to do in the future. arr_tetris_screen is an array that holds the values for the conditions of a Tetris screen, and box means that a box has been put in that square (box is a constant which equals 1).

void redisplay()
{
for (GLfloat redisp = 0; redisp <= 7; redisp ++)
{
for (GLfloat redisp2 = 0; redisp2 <= 14; redisp ++)
{
switch (arr_tetris_screen [redisp] [redisp2])
{
case box:
{
glBegin(GL_QUADS);
glColor3f(1.0, 0.0, 0.0);
glVertex3f(redisp+1, redisp2+1, 0.0); glVertex3f(redisp, redisp2+1, 0.0);
glVertex3f(redisp, redisp2+1, 0.0); glVertex3f(redisp, redisp2, 0.0);
}
default: exit(1234);
}
}
}
glutPostRedisplay();
}

This gives me two errors: 
"jam exited with exit code 1"
"invalid types 'GLfloat[7][14][GLfloat]' for array subscript"

I know this has OpenGL code in it, but this isn't GL-specific, so I felt that these lists are more appropriate for this question. 



All help is appreciated and thanks in advance.

~ < [ / Adam-o \ ] > ~

+-------------------------------------------+
| My computer's Stats                      |
| Mac OS 10.4.8                               |
| 1 Ghz Apple Powerbook G4        |
| Xcode v. 2.4.1                                 |
+-------------------------------------------+

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please keep your posts straight and 
to the point. Also please comment 
the code you use as I am still learning 
OpenGL and Xcode and may not yet 
understand the meaning of the command.
 Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Redisplaying the Window
      • From: Chris Espinosa <email@hidden>
    • Re: Redisplaying the Window
      • From: David Dunham <email@hidden>
  • Prev by Date: Re: Dev on mac, build on a sparc
  • Next by Date: Re: Redisplaying the Window
  • Previous by thread: Undefined local symbol error
  • Next by thread: Re: Redisplaying the Window
  • Index(es):
    • Date
    • Thread