• 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
OpenGL-10.4.7 incompatibility
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OpenGL-10.4.7 incompatibility


  • Subject: OpenGL-10.4.7 incompatibility
  • From: nestor cardozo <email@hidden>
  • Date: Fri, 30 Jun 2006 22:26:15 +0200

Okay, I have identified where the problem in my program is:

When I disable lighting my app works fine in 10.4.7 Intel or ppc.

When lighting is enabled the app only works fine in 10.4.7 ppc.

The initialization code for my NSOpenGLView is in the

initWithCoder: method

The code that I use to define lighting within this method is something like:

	self = [super initWithCoder:c];
	NSOpenGLContext *glContext;
	glContext = [self openGLContext];
	[glContext makeCurrentContext];

// Lights
	GLfloat ambientLight[] = {intAmbient,intAmbient,intAmbient,1.0};
	GLfloat diffuseLight[] = {intDiffuse,intDiffuse,intDiffuse,1.0};
	GLfloat specular [] = {intSpecular, intSpecular, intSpecular, 1.0};
	GLfloat specref[] = {0.5, 0.5, 0.5, 1.0};

	glEnable(GL_LIGHTING);
	glLightfv(GL_LIGHT0, GL_AMBIENT,ambientLight);
	glLightfv(GL_LIGHT0, GL_DIFFUSE,diffuseLight);
	glLightfv(GL_LIGHT0, GL_SPECULAR, specular);
	glEnable(GL_LIGHT0);
	glEnable(GL_COLOR_MATERIAL);
	glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE);
	glMaterialfv(GL_FRONT,GL_SPECULAR,specref);
	glMateriali(GL_FRONT,GL_SHININESS,50);

	// other stuff
	return self;

As I said when I comment the glEnable (GL_LIGHTING) line, everything works fine (except that there are no lights). When I comment the glEnable(GL_COLOR_MATERIAL) line everything shows up well but only in gray.

The strange thing is that my code works well in 10.4.7 ppc, but not 10.4.7 Intel.

I have installed the newest 10.4.7 Intel update:

SHA1MacOSXUpd10.4.7Intel.dmg= 10aa57dfccd63accb0939a894cea202a8910fb45

I appreciate any help

Nestor Cardozo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: OpenGL-10.4.7 incompatibility
      • From: Steve Christensen <email@hidden>
  • Prev by Date: Re: Is there another way to do performSelectorOnMainThread?
  • Next by Date: NSMutableDictionary & Strings - Weird, weird problem
  • Previous by thread: I need help on simple Sketch app and Cocoa bindings
  • Next by thread: Re: OpenGL-10.4.7 incompatibility
  • Index(es):
    • Date
    • Thread