May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

Beginning in Qt with OpenGL

Page  
1

Hi..
I have begun to work with opengl in QT Qt…

Getting more errors on ‘gl.h’…. one of them is…

syntax error: void should be preceded by ‘;’

that error points to this line in ‘gl.h’

WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);

help me with this…. Thank you..

 Signature 

:)

26 replies

May 23, 2011

Chuck Gao Chuck Gao
Lab Rat
342 posts

As you asked in another thread(http://developer.qt.nokia.com/forums/viewthread/6068/) before, do you try other exmaples? You can just make a QGLWidget yourself, and build to see what happen with your SDK or environment. By the way, which platform you are working with?

 Signature 

Chuck

May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

As you asked in another thread(http://developer.qt.nokia.com/forums/viewthread/6068/) before, do you try other exmaples? You can just make a QGLWidget yourself, and build to see what happen with your SDK or enviorment.

Yeah , this is not the same project , I have started a fresh project myself and added basic codes to IntializeGL,ResizeGL,paintGL and to draw a triangle…

but the errors haven’t changed…

By the way, which platform you are working with?

I’m working in Windows Xp with Nokia’s QT SDK for Nokia N97 mini

 Signature 

:)

May 23, 2011

Chuck Gao Chuck Gao
Lab Rat
342 posts

Do you build for desktop or symbian device ? Can you send your code to me, i can try it on my computer for you. Email: chuckgao.cg@gmail.com

 Signature 

Chuck

May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

Sure,… Thank you Chuck.Gao

 Signature 

:)

May 23, 2011

Chuck Gao Chuck Gao
Lab Rat
342 posts
Dinesh Balu wrote:
Sure,… Thank you Chuck.Gao

The code have some wrong syntax. right one is modified
1. GamePlay::InitializeGL() —> GamePlay::initializeGL() in both header and source file
2. glViewPort —> glViewport
3. draw() —> GamePlay::draw()

I can build it on both Desktop(also simulator) and Symbian device, but it’ll crash some where.

 Signature 

Chuck

May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

k, I have change it as you said… but still the same errors are there…

did you get the output?

 Signature 

:)

May 23, 2011

Chuck Gao Chuck Gao
Lab Rat
342 posts

no, it’s OK for me. Maybe there have some problem with your environment or SDK, i’m not sure. You can paste the log on this thread, i think someone can resolve your problem

 Signature 

Chuck

May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

how to get the log? I couldn’t copy the error, it’s disabled…!
There is no log file in the debug directory..

Is it would work if I re-install the SDK

 Signature 

:)

May 23, 2011

ZapB ZapB
Robot Herder
1354 posts

Have you added #include <gl.h> yourself? If so there is no need, QGLWidget takes care of all that for you. I seem to think there can be issues if OpenGL headers and Windows headers are #include’d in the wrong order.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

No, I didn’t add them… now I’m re-installing the Qt SDK

 Signature 

:)

May 23, 2011

Chuck Gao Chuck Gao
Lab Rat
342 posts
Dinesh Balu wrote:
No, I didn’t add them… now I’m re-installing the Qt SDK

Good luck :-)

 Signature 

Chuck

May 23, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

Um…. Let’s see… what if it’s still not working :(

 Signature 

:)

May 24, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts

I have re-installed the SDK… Now the errors are gone ,.. and application is running successfully.. except I’m not getting the exact output….

@Chuck.Gao : what was the output you got with the project?

The Project type is Qt Mobile Application , doesn’t it support OpenGL and should I go for OpenGL ES…

 Signature 

:)

May 24, 2011

Chuck Gao Chuck Gao
Lab Rat
342 posts

The mobile use OpenGL ES, but not OpenGL.
Output for what ? Sorry, i can’t see anything until the application crash.

 Signature 

Chuck

May 24, 2011

Dinesh Balu Dinesh Balu
Lab Rat
45 posts
Chuck.Gao wrote:
no, it’s OK for me. Maybe there have some problem with your environment or SDK, i’m not sure. You can paste the log on this thread, i think someone can resolve your problem

You said that you got my app running on your sdk… right?
did you get any output in that?

I have drawn a triangle in that app…

how to use OpenGL ES with QT

 Signature 

:)

Page  
1

  ‹‹ if i want to place QWebKit on top of OpenGL what is the best way to do it ?      QGLFramebufferObject with 3D texture ››

You must log in to post a reply. Not a member yet? Register here!