PDA

View Full Version : (strstr(glGetString(GL_EXTENSIONS), "EXT_multitexture") != NULL) ????



dabeav
05-23-2002, 12:26 PM
What is wrong with this??

if(strstr(glGetString(GL_EXTENSIONS), "EXT_multitexture") != NULL)
{
do stuff
}

why do i keep getting the error, parameter one cannot be converted from, const usigned char * to const char * ???? any one got a clue?? damn i am really starting to get annoyed with this extensions thing.

[This message has been edited by dabeav (edited 05-23-2002).]

nickels
05-23-2002, 12:36 PM
Your problem is C++. It is an annoying, officious language. Try:

if(strstr((const char*)glGetString(GL_EXTENSIONS), "EXT_multitexture") != NULL)

........

i.e. force the type conversion.

I hate C++, it insults my intelligence.

bakery2k
05-23-2002, 01:32 PM
There is no EXT_multitexture extension ( as far as I know). Use ARB_multitexture instead. You need to search for GL_ARB_MULTITEXTURE, not just ARB_MULTITEXTURE.

dabeav
05-23-2002, 01:56 PM
Thank you polygon gods. That worked like a dream. Cant believe i missed that REPEATEDLY. oh im sooooo over worked. Oh, and once again, sorry about the miss type, i knew that it was ARB, instead of EXT, my bad. Thank you once again.

Leyder Dylan
05-24-2002, 08:27 AM
Extension = (char *) glGetString(GL_EXTENSIONS);

if (!(strstr(Extension, "GL_ARB_multitexture")) == 1)
{//not supported}
else
{//supported}