error al manejar pthread en OpenGL +allegroGL

UTILIZO ESTA FUNCION EN EL CUAL SE CREA UN HILO :

void *HILO_DRAW(void *parametro)
{

while (1)
{			
	
	pthread_mutex_lock (&mutexBuffer);							
	printf("errorrr1

");
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
printf("errorrr2
");
pthread_mutex_unlock (&mutexBuffer);
}
}

TODO ESTA BIEN SE CREA LA PANTALLA PERO DESPUES HAY ERROR:
CUANDO COLOCO CODIGO OPENGL EN EL PTHREAD:

errorrr1
Shutting down Allegro due to signal #11
Violación de segmento

ALGUNA RESPUESTA SE LOS AGRADECERIA?¿?¿ DEL PORQUE

In this thread there is an active context?
I don’t know what your driver is doing internally, but probably have a map of threadID and context, and if it don’t find the context it crash

Can you speak english?