Sign in to follow this  
alceloco

GLUT permission denied

Recommended Posts

alceloco    122
Hello, I need to run a GLUT app on a linux machine that is unfortunately not mine. Permission to /dev/nvidiactl is denied, so I guess I cant get hardware acceleration. Changing this is most likely not possible... However, while my GLUT program does start and the display function is called, nothing is drawn (only pixel garbage shown in the window). Here is a minimal example, just in case:
#include <stdio.h>
#include <GL/glut.h>

void display(void)
{

  printf("Display!\n");

  glClear(GL_COLOR_BUFFER_BIT);
  glutWireTeapot(0.5);
  glFlush();

}

int main(int argc, char * argv[])
{

  glutInit(&argc, argv);
  glutInitDisplayMode(GLUT_RGBA | GLUT_SINGLE);

  glutInitWindowSize(640, 480);
  glutInitWindowPosition(200, 100);

  glutCreateWindow("Hello");

  glClearColor(0.0, 0.0, 0.0, 0.0);
  glutDisplayFunc(display);

  glutMainLoop();

  return 0;

}
The questions are: - Can my program somehow detect this problem? - Can I switch to software rendering (I thought Open GL supported that kind of fallback strategy...)? My rendering isnt too complex and I dont need high frame rates, so this could be okay. Any suggestions? :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this