thanks.
The problem is that i have a my little opengl engine implementation with a textures management that uses gl.h, i must replace gl.h with an other header?
I wish use my opengl code for various reasons
this is my relevant code:
#pragma once
#include <QtOpenGL\qglwidget>
#include <vector>
#include "ViewBase.h"
#include "Renderer.h"
#include "texture.h"
#include "Controller.h"
#include "View.h"
#include "qmdisubwindow.h"
namespace OPEN
{
class CGlWidgetImage
: public QGLWidget ,
public CView< CModel, CController>
{
Q_OBJECT;
public:
CGlWidgetImage();
~CGlWidgetImage(void);
void Init();
void update(CModelBase* pModel, int id);
void setMdi(QMdiArea* pMdi );
signals:
private:
void init_cl();
ptrRenderer m_ptrRenderer;
ptrTexture m_ptrTexImg;
bool m_b ;
public slots:
void OnIdleOpenGl ();
void setTexture();
protected:
void paintGL();
void initializeGL();
QMdiArea* m_pMdi;
};
typedef std::shared_ptr<CGlWidgetImage> ptrGlWidgetImage;
}
#pragma once
#include <QtOpenGL\qglwidget>
#include <vector>
#include "ViewBase.h"
#include "Renderer.h"
#include "texture.h"
#include "Controller.h"
#include "View.h"
#include "qmdisubwindow.h"
namespace OPEN
{
class CGlWidgetImage : public QGLWidget , public CView< CModel, CController>
{
Q_OBJECT;
public:
CGlWidgetImage();
CGlWidgetImage(const QGLFormat format);
~CGlWidgetImage(void);
void Init();
void update(CModelBase* pModel, int id);
void mousePressEvent(QMouseEvent* pMouse);
void mouseReleaseEvent(QMouseEvent* pMouse);
void mouseMoveEvent(QMouseEvent* pMouse);
void setMdi(QMdiArea* pMdi );
signals:
void MousePressed(QMouseEvent* pMouse);
void MouseRelased(QMouseEvent* pMouse);
void MouseMoved(QMouseEvent* pMouse);
private:
void init_cl();
ptrRenderer m_ptrRenderer;
ptrTexture m_ptrTexImg;
bool m_b ;
public slots:
void OnIdleOpenGl ();
void setTexture();
protected:
void paintGL();
void initializeGL();
QMdiArea* m_pMdi;
};
typedef std::shared_ptr<CGlWidgetImage> ptrGlWidgetImage;
}
To copy to clipboard, switch view to plain text mode
in #include "texture.h" i have
#pragma once
#include "graphicslib.h"
#include "OpenObject.h"
#include <gl.h>//----------> problem
using namespace std;
namespace OPEN{
class GRAPHICS_ITEM CTexture : public COpenObject
{
OPEN_DECLARE_RTTI;
STREAM_DECLARATION(CTexture);
public:
CTexture(){m_ID = 0;};
CTexture(const std::string& strFileInRes, bool bMipmap, GLint magFilter, GLint minFilter, GLint wrapS, GLint wrapT);
~CTexture();
bool LoadTexture();
GLuint m_ID;
bool UpdateTexture(string strFile);
void LoadTextureNew(string strFile);
private:
std::string m_strFile;
bool m_bMipmap;
GLint m_magFilter;
GLint m_minFilter;
GLint m_wrapS;
GLint m_wrapT;
};
typedef shared_ptr<CTexture> ptrTexture;
}
#pragma once
#include "graphicslib.h"
#include "OpenObject.h"
#include <gl.h>//----------> problem
using namespace std;
namespace OPEN{
class GRAPHICS_ITEM CTexture : public COpenObject
{
OPEN_DECLARE_RTTI;
STREAM_DECLARATION(CTexture);
public:
CTexture(){m_ID = 0;};
CTexture(const std::string& strFileInRes, bool bMipmap, GLint magFilter, GLint minFilter, GLint wrapS, GLint wrapT);
~CTexture();
bool LoadTexture();
GLuint m_ID;
bool UpdateTexture(string strFile);
void LoadTextureNew(string strFile);
private:
std::string m_strFile;
bool m_bMipmap;
GLint m_magFilter;
GLint m_minFilter;
GLint m_wrapS;
GLint m_wrapT;
};
typedef shared_ptr<CTexture> ptrTexture;
}
To copy to clipboard, switch view to plain text mode
Bookmarks