wglDescribePixelFormat problem

frondeus wrote on Friday, June 24, 2011:

GL Intercept Log. Version : 1.0
Function: glfwOpenWindow( Width,Height, 8,8,8,8,24,8, GLFW_WINDOW )
Problem: “Function wglDescribePixelFormat is being called on a thread that
does not have the main context”
"GL ERROR - Function wglDescribePixelFormat generated error
GL_INVALID_OPERATION"
Version 2.7
Add. Lib: None

elmindreda wrote on Friday, June 24, 2011:

Some context would be very useful.

Also, GLFW 2.7 doesn’t call wglDescribePixelFormat. It calls
DescribePixelFormat.

frondeus wrote on Saturday, June 25, 2011:

So GLFW does n’t create a context?

elmindreda wrote on Saturday, June 25, 2011:

Usually it can.

I meant context for the problem, such as the source for the program used.

frondeus wrote on Tuesday, June 28, 2011:

#include <GL/glfw.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <string.h>
#include <fstream>
#include <vector>
#include <map>
#include <stdarg.h>
#include <ctime>
using namespace std;
int main(int argc, char **argv)
{
if( !glfwInit() )
{
std::exit(EXIT_FAILURE);
}
GLFWvidmode mode;
		glfwGetDesktopMode(&mode);
		if( !glfwOpenWindow( Width,Height, mode.RedBits,mode.GreenBits,mode.BlueBits,8,24,8, GLFW_WINDOW ) )
		{
			glfwTerminate();
		        std::exit(EXIT_FAILURE);
		}
int running = GL_TRUE;
while( running )
	{
		// OpenGL rendering goes here...
		glClear( GL_COLOR_BUFFER_BIT );
		glfwSwapBuffers();
		running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED );
	}
glfwTerminate();
return 0;
}

elmindreda wrote on Tuesday, June 28, 2011:

This program doesn’t run on your machine?

frondeus wrote on Thursday, June 30, 2011:

works, but I wanted to report that the GL Intercept displays warning / error.
It could be something important.

elmindreda wrote on Thursday, June 30, 2011:

Ah, thank you!

However, GLFW doesn’t ever call wglDescribePixelFormat and DescribePixelFormat
does not require an OpenGL context, so I think GL Intercept is confused.