I have a small application on OpenGL+GLEW. Now, I am trying to rewrite it with QT(instead of GLEW). But I have a problem. IDE writes:
'glActiveTexture' was not declared in this scope
glActiveTexture(TextureUnit);
^
Here is that code in .cpp file:
#include <iostream>
#include "texture.h"
Texture::Texture(GLenum TextureTarget, std::string& FileName)
{
m_textureTarget = TextureTarget;
m_fileName = FileName;
}
bool Texture::Load()
{
// A lot of code for reading the picture.
}
void Texture::Bind(GLenum TextureUnit)
{
glActiveTexture(TextureUnit);
glBindTexture(m_textureTarget, m_textureObj);
}
Here is code from .h file.
#ifndef TEXTURE_H
#define TEXTURE_H
#include <string>
#include <QGLWidget>
class Texture
{
public:
Texture(GLenum TextureTarget, std::string& FileName);
bool Load();
void Bind(GLenum TextureUnit);
private:
std::string m_fileName;
GLenum m_textureTarget;
GLuint m_textureObj;
unsigned int width, height;
unsigned char * data;
};
#endif /* TEXTURE_H */
I am starting to think that Qt doesn't present such capabilities. How can I solve this problem? I would be glad to any ideas.