sort, reorder vectors and eigen (dynamic) matrices like matlabs sort (with example) function to retrieve shader uniform names and locations, function to report open gl errors to stderr example that prints opengl version and glsl version,
19 lines
472 B
C++
19 lines
472 B
C++
#include <GLUT/glut.h>
|
|
#include <cstdio>
|
|
|
|
int main(int argc,char * argv[])
|
|
{
|
|
// Make GLUT window just to get a valid OpenGL context
|
|
glutInit(&argc,argv);
|
|
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
|
|
glutInitWindowSize(640, 480);
|
|
glutCreateWindow("Dummy");
|
|
glutCreateMenu(NULL);
|
|
|
|
printf("GL_VERSION: %s\n",
|
|
glGetString(GL_VERSION));
|
|
printf("GL_SHADING_LANGUAGE_VERSION: %s\n",
|
|
glGetString(GL_SHADING_LANGUAGE_VERSION));
|
|
return 0;
|
|
}
|