working with  the open source version .

Any more hint?


---------- Forwarded message ----------
From: ami guru <>
Date: Mon, Feb 23, 2009 at 5:18 AM
Subject: Fwd: [glew-users] Fwd: Fwd: GLEW Qt

Hello Nigel,

Thats the very first  thing i have tried. But did not work.

#ifndef GLWIDGET_H
#define GLWIDGET_H

  non-qt headers are declared first
#include <GL/glew.h>

#include <QGLWidget>
#include <QTime>

//#include <GL/glew.h>

class GLWidget : public QGLWidget

    GLWidget(QWidget *parent = 0);

    inline int xRotation() const
      return xRot;

    inline int yRotation() const
      return yRot;

    inline int zRotation() const
      return zRot;

    inline float getFPS() const
      return fps;

public slots:

    void setXRotation(int angle);
    void setYRotation(int angle);
    void setZRotation(int angle);
    void drawDifferentMode(const QString& );
    void drawDifferentStructure(const QString&);


    void xRotationChanged(int angle);
    void yRotationChanged(int angle);
    void zRotationChanged(int angle);
    void frameRateChanged(const QString&);

    void initializeGL();
    void paintGL();
    void resizeGL(int width, int height);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

    void initializeLights();

    void setCamera(float posX,
           float posY,
           float posZ,
           float targetX,
           float targetY,
           float targetZ);

      create shader specific calls
      to setup shaders and clean  them
      when we are done


    void normalizeAngle(int *angle);
    void calculateFPS();

    //id for displaylist
    GLuint teaPotId;

    int xRot;
    int yRot;
    int zRot;

    //to store the elapsed time
    int t;
    int frame;
    int timeBase;
    float fps;

    int drawMode;
    float cameraDistance;
    QPoint lastPos;
    QTime time;




---------- Forwarded message ----------
From: Nigel Stewart <>
Date: Mon, Feb 23, 2009 at 4:14 AM
Subject: Re: [glew-users] Fwd: Fwd: GLEW Qt
To: "" <>


I would simply suggest that the very first #include
in GLWidget.h is glew.h.  Likewise for all .h and .cpp
files mixing Qt and OpenGL/GLEW.

Another approach I can recommend is to provide dummy
gl.h glext.h etc files, that #include glew.h.

What Tom is suggesting should also work, but it forces things
to be structured in a particular way that avoids mixing Qt
and OpenGL code.

That doesn't appeal to me due to both Qt and OpenGL being
two of my favorite things. And for the most part, they
live happily together - I can speak from experience.

- Nigel

This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.