working with  the open source version .

Any more hint?


Sajjad

---------- Forwarded message ----------
From: ami guru <dosto.walla@gmail.com>
Date: Mon, Feb 23, 2009 at 5:18 AM
Subject: Fwd: [glew-users] Fwd: Fwd: GLEW Qt
To: glew-users@lists.sourceforge.net


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
{
    Q_OBJECT

public:
    GLWidget(QWidget *parent = 0);
    ~GLWidget();



    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&);

signals:

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

protected:
    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
     */

private:

    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;
};

#endif



*****************************************


Regards
Sajjad


---------- Forwarded message ----------
From: Nigel Stewart <nstewart@nvidia.com>
Date: Mon, Feb 23, 2009 at 4:14 AM
Subject: Re: [glew-users] Fwd: Fwd: GLEW Qt
To: "glew-users@lists.sourceforge.net" <glew-users@lists.sourceforge.net>


Sajjad,

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.
-----------------------------------------------------------------------------------