[MINC-development] GLUT colours

Andrew Janke a.janke at gmail.com
Tue Nov 1 11:00:36 EDT 2011


Hi  Jason (And others),

> I was rebuilding all the MINCy goodness on OS 10.7, and am running into some
> fun psychedelic colours with Display and register (see attached). Anybody
> have any hints about where to look to solve this? I remember a message from
> Jim a few months/years ago which appeared to suggest that this issue was
> somehow tied into MINC versions, supposedly patched in 2.0.19. I'm using
> 2.1, in case that is indeed the issue; if anyone remembers where in the MINC
> codebase that colourful output was created I can look to see if it's still
> there or has somehow returned ...

As Giovanna mentioned it seems to be a chance in freeglut that (in my
experience) causes some conflict with nvidia drivers. At least this is
the problem I see on the one Ubuntu system on which I can make this
happen. If I then remove the nvidia driver and use nv, the problem
goes away.

You'll also find that other GLUT packages are also having this issue
"out there" via our friend google. To test what is going on with your
machine (this bug seems to have multiple incarnations) try this little
bit of code:

#include <GL/glut.h>

/* compile with: gcc -o test test.c -lglut */

void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glFlush();
}

int main(int argc, char **argv) {
  glutInit(&argc, argv);
  glutCreateWindow("test");
  glutDisplayFunc(display);
  glutMainLoop();
  return 0;
}

On some systems this will result in a pretty colours others a black
background (as would be expected). Some also have this little bit of
test code whinging "Could not get requested colour_map_mode(0),
got(1,256)".

So, that's where I've got with this so far!  ie: nowhere really given
that I can reproduce the buggy behavior without MINC!

My only thought for this is to finish off/trim down viewnup and put
the point based registration code into it as it doesn't seem to suffer
this issue.  So that's what I've been doing in the last few weeks as
this one doesn't seem to want to go away.

here's hoping you find some magick little hack to get around this.

:)


a


More information about the MINC-development mailing list