|
发表于 2012-12-3 15:08:45
|
显示全部楼层
- const GLubyte* extensions=glGetString(GL_EXTENSIONS);
- std::list<std::string> lst;
- const char * buffer,*token,*next_token,*delim="\x20";
- buffer = (const char*)extensions;
- token = strtok_s(buffer,delim,&next_token);
- while(token != NULL)
- {
- lst.push_back(std::string(token));
- token = strtok_s(NULL,delim,&next_token);
- }
- if(std::find(lst.begin(),lst.end(),"GL_ARB_texture_non_power_of_two"))
- {
- //support this extension
- }
- else
- {
- //do not support this extension
- }
复制代码 |
|