Hi, I’ve been using SDL for awhile and decided to look into OpenGL. It turns out, oddly enough, that when I try to compile ANYTHING now (though I had a working openGL window for awhile there) that I get the following when I run it in terminal:
/home/username/gl_test1/green
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 135 (GLX)
Minor opcode of failed request: 19 (X_GLXQueryServerString)
Serial number of failed request: 22
Current serial number in output stream: 22
<<That one’s from a tutorial I found, but everything I’m trying seems to put that out now. It is very discouraging… Here’s the code from that BadRequest, though it happens for everything I try for some reason (out of nowhere):
/*
* green.c
* This program draws a green window. (Yawn!)
*/
#include <GL/gl.h>
#include <GL/glut.h>
void green (void) {
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitWindowSize(400, 400);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutCreateWindow ("green");
glutDisplayFunc(green);
glClearColor (0.0, 1.0, 0.0, 1.0);
glutMainLoop();
return(0);
}
My Linker Options under codeblocks are still set to the same things they were when I got my window compiling (this isn’t it, etc) and it compiles just fine via terminal, also, but gives me that BadRequest thing when I try to run it in terminal. Any thoughts? @_@;