PDA

View Full Version : Where is GL_CLAMP_TO_EDGE?



ricardo
24th July 2009, 03:33
Hi friends!

My QGLWidget derived class has this:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
But compiler says GL_CLAMP_TO_EDGE is an undeclared identifier.

Which file should I include?
BTW, evidently I include:
#include <QGLWidget>

Thanks a lot.

EDIT: Another qustion, how can I know if an extension is supported or not?

wysota
24th July 2009, 11:50
I think this is out of scope of this forum :) You need to query your GL implementation for the extension (you need to know its id). GL_CLAMP_TO_EDGE is non-standard so it will not be part of your GL.h - basically you need to find its id and define it.

http://www.gamedev.net/community/forums/topic.asp?topic_id=191794