Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Qt and OpenGL, Really Basic Question!

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2009
    Posts
    4

    Qt and OpenGL, Really Basic Question!

    Hello all!
    I'm a C++ programmer.
    i want to develop a simple app by Qt in windows.
    I've tried OpenGL Qt tutorials and demos, its name is HelloGl.

    this is code:
    #include <QtGui>
    #include <QtOpenGL>
    #include <math.h>
    #include "glwidget.h"
    GLWidget::GLWidget(QWidget *parent)
    : QGLWidget(parent)
    {
    object = 0;
    .
    .
    .

    When i've tried to compile it, a fatal error occurs!
    Line 2! QtOpenGL not found!
    i've found it Qt\4.4.3\include\QtOpenGL but how should i use it!
    I know DirectX SDK should install in design time, I cannot find any SDK for OpenGL, I found some interface at this address http://www.opengl.org/sdk/

    I'm really confused, how can i develop with OpenGL, there's not any kind of SDK!
    Please help me!

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Qt and OpenGL, Really Basic Question!

    This is not related to OpenGL. Configure correctly paths in your development environment, IDE or project.

  3. #3
    Member Newbie
    Join Date
    Feb 2007
    Location
    Tourlaville, France
    Posts
    48

    Re: Qt and OpenGL, Really Basic Question!

    QtOpenGL not related to OpenGL ? interesting...
    Anyways, you must add QT += opengl in your .pro for qmake to find the headers and link properly.

  4. #4
    Member Newbie
    Join Date
    Sep 2004
    Posts
    43

    Re: Qt and OpenGL, Really Basic Question!

    Hi,

    Please disregard the dletozeun's comment, unfortunately some forum members don't have anything better to do.

    How did you installed Qt?

    It looks like you didn't setted it up correctly.

    What compiler are you using?

    An easy way to have it installed into your system without much hassle is to use the new QtCreator.
    http://www.qtsoftware.com/developer/...tor/qt-creator

    Otherwise I would advise you to follow the installation instructions

    http://doc.trolltech.com/4.4/installation.html

    And the OpenGL tutorials.
    http://doc.trolltech.com/4.4/examples.html#opengl

    Cheers,
    Paulo

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2009
    Posts
    4

    Re: Qt and OpenGL, Really Basic Question!

    hi dude,

    I've no problem with Qt 4.4.3.
    I think it's ok, i've not any problem with it. i have only problem with opengl, now i want to know, if i want to develop an application and use OpenGl in it, should i have a SDK and use it?
    like DirectX SDK?!
    and where can i find its sdk?

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Qt and OpenGL, Really Basic Question!

    No need for an extra sdk, pjmlp gave a link with multiple opengl examples with Qt. Download one, it should compile out of the box. if not, then it means you did not setup Qt correctly, ie. missing include headers and such.

  7. #7
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Qt and OpenGL, Really Basic Question!

    Cpp Deever, I sincerely apologize for having been so harsh, my answer was poorly formulated. I meant that your problem is more related to your Qt setup than OpenGL.

    EDIT:

    I assume you are working on visual studio, have you checked in your project properties that paths related to header files are correct?

    This tutorial may interest you:
    Setting up a Qt project in Visual Studio .NET

  8. #8
    Junior Member Newbie
    Join Date
    Feb 2009
    Posts
    4

    Re: Qt and OpenGL, Really Basic Question!

    tank you dletozeun and pjmlp.
    how this is possible develop an opengl application without any sdk?
    I've installed Qt Commercial 4.4.3, is the sdk inside it?

  9. #9
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Qt and OpenGL, Really Basic Question!

    how this is possible develop an opengl application without any sdk?
    Because opengl is not direct3d.
    You only need .h headers for the interface and good drivers for the runtime library implementation.

  10. #10
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Qt and OpenGL, Really Basic Question!

    Did you finally succeed to configure your project?

    If you absolutely want to an OpenGL SDK, there are actually some people that are (still?) working on a unofficial one. If it is released one day, it will be probably too late for you but you may want to bring some suggestion to their attention.

    See:
    http://glsdk.sourceforge.net/
    and the opengl thread:
    http://www.opengl.org/discussion_boa...510#Post246510

Page 1 of 2 12 LastLast

Similar Threads

  1. Basic OpenGL question
    By gordon1 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-30-2011, 10:49 AM
  2. Really basic OpenGL question
    By Conan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-10-2004, 03:26 AM
  3. Basic OPenGL Question, easy for you pros
    By Twisted29 in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 02-16-2004, 01:29 AM
  4. Basic Question on OpenGL App Dev
    By npat in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-26-2003, 06:34 AM
  5. Some Basic OpenGL question for a beginer
    By Hobbes7714 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 10-07-2002, 03:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean