OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: dz on June 07, 2004, 05:53:37 pm

Title: 3d Programming
Post by: dz on June 07, 2004, 05:53:37 pm
Just out of curiosity, is there any kind of 3d framework for the Zaurus?  Mainly 5600\'s?

I\'m programming a 3d File Browser (http://www.freshmeat.net/projects/3dfb/) and I was just thinking of how neat it\'d be if I could port it to my zaurus..

So.. is there any kind of OpenGL/GLUT framework for the zaurus?
Title: 3d Programming
Post by: cwaig on June 08, 2004, 04:47:46 am
Porting TinyGL would be pretty easy - but performance would be very poor, due to the use of floating point for calculations (no FP hardware on the Zaurus). What\'s needed is a fixed point implementation of a rendering engine. I kind of started one based on the 2D fixed-point rendering engine I wrote for the Dreamcast Flash player, but I never really made any progress on it (lack of time really). It\'s obviously possible (just try the demo of Interstellar Flames to see what can be achieved), but it\'s down to who\'s got the time to do it?
Title: 3d Programming
Post by: rrusaw on June 24, 2004, 03:07:56 am
You could use Klimt (http://klimt.sourceforge.net/), a GPL'd fixed point 3D library that whose API is virtually identical to the OpenGL/ES (OpenGL for Embedded) spec. CVS doesnt compile at the moment for Linux/QTE but the last release version did, as I haven't sent a recent patch back upstream to the maintainer in a while.

If you are interested I could post my Freeglut (http://freeglut.sourceforge.net/) port and the related libraries necessary for programming for the Zaurus using the GLUT api. It requires a patched Klimt CVS lib, a back port of the KDE projects QT C bindings, and a custom event loop library that handles the translation between the QT event loop and GLUTs main loop. Altogether they are several MB compiled, and I dont have any webspace to host binary ipks or source tarballs, so they've been collecting virtual dust on my PC for a few months.

Note: I've only ever tested them on my 5500, any other Z may or may not work without a little manual source patching.

Cheers,

Ryan
Title: 3d Programming
Post by: cwaig on June 24, 2004, 05:48:59 pm
I'd not come across that before - it really looks cool

I must try a spot of playing with it....
Title: 3d Programming
Post by: flex48 on July 01, 2004, 09:25:52 am
Hi!

Since I am working on an OpenVRML port for the Zaurus (5500 too), I am highly interested in this topic. Ryan please upload your binary libs (and sources)  to sourceforge (or somewere), I 've successfully compiled klimt but freeglut is still missing.

Andreas
Title: 3d Programming
Post by: rrusaw on July 07, 2004, 04:11:30 am
Flex,

You need them packaged into .ipks? I generally just upload the .so's and applications to my Z and use LD_PRELOAD to run them. If so I will try to find the time to package them  this week, as soon as I get the opportunity to upload them to SF.

Ryan
Title: 3d Programming
Post by: rrusaw on July 07, 2004, 11:25:08 pm
Andreas,

Source archive (http://prdownloads.sourceforge.net/poqetp/z3d.tar.gz?download)

Ryan
Title: 3d Programming
Post by: loau05 on July 16, 2004, 12:34:43 pm
Hi,

it's quite interesting for me what you're discussing about. I'm thinking about
implementing a terrain modeler for my (and others) Zaurus 5500 for visualization
of DEMs. I'm running OZ3.3.5. I just tried to compile klimt for linux ... but I failed when
building freeglut. Does anybody have a collection of all (working) required sources to
build klimt for Linux and QPE?
Thanks,
Georg
Title: 3d Programming
Post by: rrusaw on July 16, 2004, 12:49:24 pm
Quote
 
Hi,

it's quite interesting for me what you're discussing about. I'm thinking about
implementing a terrain modeler for my (and others) Zaurus 5500 for visualization
of DEMs. I'm running OZ3.3.5. I just tried to compile klimt for linux ... but I failed when
building freeglut. Does anybody have a collection of all (working) required sources to
build klimt for Linux and QPE?
Thanks,
Georg

Georg,

What errors do you get when trying to build it? The source archive I posted is a straight copy from my work directory, and it all builds fine for me in there. The only other requirements to build it would be a working development enviroment AFAIK.

Ryan
Title: 3d Programming
Post by: scoutme on July 16, 2004, 05:56:24 pm
I'm very very interested in FreeGlut port! can you give me some files/instructions to start using glut on my sl-c860?

thanks
Title: 3d Programming
Post by: loau05 on July 17, 2004, 05:23:09 am
Quote
Quote
 
Hi,

it's quite interesting for me what you're discussing about. I'm thinking about
implementing a terrain modeler for my (and others) Zaurus 5500 for visualization
of DEMs. I'm running OZ3.3.5. I just tried to compile klimt for linux ... but I failed when
building freeglut. Does anybody have a collection of all (working) required sources to
build klimt for Linux and QPE?
Thanks,
Georg

Georg,

What errors do you get when trying to build it? The source archive I posted is a straight copy from my work directory, and it all builds fine for me in there. The only other requirements to build it would be a working development enviroment AFAIK.

Ryan
Ryan,

sorry, I'm new in the forum. I tried it using the sources from freeglut's website.
Where can I find your sources? My development environment (KDevelop) works
fine for my other qpe-projects ...

Thanks,
Georg
Title: 3d Programming
Post by: loau05 on July 17, 2004, 08:10:21 am
Quote
Quote
 
Hi,

it's quite interesting for me what you're discussing about. I'm thinking about
implementing a terrain modeler for my (and others) Zaurus 5500 for visualization
of DEMs. I'm running OZ3.3.5. I just tried to compile klimt for linux ... but I failed when
building freeglut. Does anybody have a collection of all (working) required sources to
build klimt for Linux and QPE?
Thanks,
Georg

Georg,

What errors do you get when trying to build it? The source archive I posted is a straight copy from my work directory, and it all builds fine for me in there. The only other requirements to build it would be a working development enviroment AFAIK.

Ryan

Hi Ryan,

in the meanwhile I've found your sources but I still can't build the libs. Which KDevelop version do you use? I'm using 2.1.5 so that I can't use your project files. I tried to
build freeglut_qws with qmake and the .pro file. Make fails with something like 'no rule defined to build /usr/lib/qt3/mkspecs/qmake.conf'. I don't intend to upgrade to KDevelop 3.0.x at the moment because then my Zaurus-Dev-Env. might not work anymore. Any suggestions?

Thanks,
Georg

SuSE 9.0, Kernel 2.4.21-99-default
Title: 3d Programming
Post by: rrusaw on July 18, 2004, 12:14:23 am
Georg,

I'm running a self compiled version of Kdevelop from CVS, but that shouldn't matter, as you can manually run qmake to build the makefiles assuming you have the correct qmake setup.

Extract the attached qws.tgz somewhere, and then either export the QMAKESPEC environment variable to ${PATH_WHERE_YOU_EXTRACTED_IT}/qws/linux-sharp-g++ or specify that on the qmake command line with the -spec argument. You'll have to set your QTDIR variable to your qt/embedded directory first to ensure you dont pull in any native qt3 directories.

Ryan
Title: 3d Programming
Post by: loau05 on July 18, 2004, 12:27:46 pm
Quote
Georg,

I'm running a self compiled version of Kdevelop from CVS, but that shouldn't matter, as you can manually run qmake to build the makefiles assuming you have the correct qmake setup.

Extract the attached qws.tgz somewhere, and then either export the QMAKESPEC environment variable to ${PATH_WHERE_YOU_EXTRACTED_IT}/qws/linux-sharp-g++ or specify that on the qmake command line with the -spec argument. You'll have to set your QTDIR variable to your qt/embedded directory first to ensure you dont pull in any native qt3 directories.

Ryan

Ryan,

thank you. Now I can compile but then the linker fails with 'cannot find lXext' although XFree86-devel is installed and the libs (libXext.a and libXext.so) are in the X11-libs-dir.

Georg
Title: 3d Programming
Post by: rrusaw on July 19, 2004, 01:17:16 am
Quote
thank you. Now I can compile but then the linker fails with 'cannot find lXext' although XFree86-devel is installed and the libs (libXext.a and libXext.so) are in the X11-libs-dir.

Georg,

Looks like its still pulling native libraries in... linking againt Qt/Embedded does not require any X libraries to be present at all... and in fact linking against them is generally a sure fire way to have your app fail when you try to run it on the Z.

Ryan
Title: 3d Programming
Post by: loau05 on July 19, 2004, 04:29:27 am
Ryan,

I see, probably I'm mixing up something with my dev-configuration. Which libraries/includes do I need for building freeglut/klimt? I'm using qt-emb. 2.3.7
for my other qpe-projects - is that ok for klimt?
Thanks,
Georg
Title: 3d Programming
Post by: loau05 on July 19, 2004, 11:00:49 am
Quote
Quote
thank you. Now I can compile but then the linker fails with 'cannot find lXext' although XFree86-devel is installed and the libs (libXext.a and libXext.so) are in the X11-libs-dir.

Georg,

Looks like its still pulling native libraries in... linking againt Qt/Embedded does not require any X libraries to be present at all... and in fact linking against them is generally a sure fire way to have your app fail when you try to run it on the Z.

Ryan

Ryan,

finally I made it (somehow) to build a freeglut.so. Could you please be so kind and
explain the dependencies and meanings of the several libs contained in your source-package to me? What are the minimum requirements to use klimt on the
Z5500? I can't await to start with that stuff ... g*

Thanks a lot,
Georg
Title: 3d Programming
Post by: rrusaw on July 19, 2004, 12:46:04 pm
Quote
Ryan,

finally I made it (somehow) to build a freeglut.so. Could you please be so kind and
explain the dependencies and meanings of the several libs contained in your source-package to me? What are the minimum requirements to use klimt on the
Z5500? I can't await to start with that stuff ... g*

Thanks a lot,
Georg

Georg,

Klimt just requires libqpe and libqte. Nothing else is required.
Freeglut requires libqpe, libqte, libKlimt, libqpc, libqtc and libglut2qevent. libqpc and libqtc are C bindings to libqpe and libqte respectively, and libglut2qevent handles the mapping of the glut main loop into a qevent loop. The source code to all 3 of those libraries is also in the source tarball.

To run apps I generally use LD_PRELOAD, ie.

LD_PRELOAD=./libKlimt.so ./SomeKlimtApplication

or

LD_PRELOAD=./libKlimt.so:./libglut2qevent.so:./libqtc.so:./libqpc.so:./libfreeglut.so ./SomeGLUTApplication

Alternatively you could place the libraries somewhere in your LD_LIBRARY_PATH

Good luck,

Ryan
Title: 3d Programming
Post by: loau05 on July 19, 2004, 03:40:23 pm
Ryan,

does that mean that I don't need freeglut for building apps using klimt? If so (I can't believe) what's the difference and why do I (might) need freeglut?

Georg
Title: 3d Programming
Post by: rrusaw on July 19, 2004, 03:57:37 pm
Quote
 
Ryan,

does that mean that I don't need freeglut for building apps using klimt? If so (I can't believe) what's the difference and why do I (might) need freeglut?

Georg

Georg,

That is correct, freeglut is not required for building apps directly using Klimt, anymore than you need to use freeglut on your PC to build OpenGL apps. It just provides a windowing toolkit with event handling and some additional utility functions. From the freeglut homepage  "GLUT (and hence freeglut) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions."

If you look at the examples provided in the source archive, you'll find examples of both types of applications. simple_linux_qte and KlimtDemo_qws, in the klimt/test directory, just use libKlimt and the regular Qt api. The test appliction in the freeglut/test directory uses the GLUT api to perform a similar task.

Ryan
Title: 3d Programming
Post by: loau05 on July 20, 2004, 09:23:51 am
Quote
Quote
 
Ryan,

does that mean that I don't need freeglut for building apps using klimt? If so (I can't believe) what's the difference and why do I (might) need freeglut?

Georg

Georg,

That is correct, freeglut is not required for building apps directly using Klimt, anymore than you need to use freeglut on your PC to build OpenGL apps. It just provides a windowing toolkit with event handling and some additional utility functions. From the freeglut homepage  "GLUT (and hence freeglut) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions."

If you look at the examples provided in the source archive, you'll find examples of both types of applications. simple_linux_qte and KlimtDemo_qws, in the klimt/test directory, just use libKlimt and the regular Qt api. The test appliction in the freeglut/test directory uses the GLUT api to perform a similar task.

Ryan

Ok, I will try klimt first to go on with freeglut thereafter ... as soon as there's enough time for it - too much work at the moment :-(

Georg
Title: 3d Programming
Post by: mikesilver on October 30, 2004, 11:39:08 am
Hi

Im newby with zaurus. Im trying to compile klimt for zaurus, bue im having a liltle problems.

When i try to compile klimt he complains that "No rule to make target 'usr/lib/qt3/mkspecs/qws/linux-sharp-g++/qmake.conf'

Some posts back you explain how to fix this, but i realy dont understand.

I just try to copy 'qws\linux-sharp-g++\*' from you tar archive to usr/lib/qt3/mkspecs/qws/linux-sharp-g++/, but then it starts to give-me stupid erros.

Do i need to do something else? And if so, how to do that?



Thanks
Title: 3d Programming
Post by: khieo on November 11, 2004, 07:34:43 pm
Well, I somehow finally managed to compile klimt for zaurus, though never had that problem mike.
Either way when trying to run Klimtdemo on sl-6000L the images looks wierd. Seems to me it should've been a single rotating cube, but what I actually see is, 4 rotating cubes on 1/3 of the top portion of the screen, side by side .

This probably has to do with the 480x640 screen resolution of the 6000 series but can't figure out how to fix it.

Anyone got any ideas or have seen this before???
Title: 3d Programming
Post by: erio on November 12, 2004, 02:31:05 am
Zsurface can be used only by QVGA.
I think that what is necessary is just to be able to use SDL.

It is a problem that neither an alpha blend nor a speculer is normally reflected rather than it...:-(

alpha blend
http://homepage2.nifty.com/cstation/Image/zmemo04090801.png (http://homepage2.nifty.com/cstation/Image/zmemo04090801.png)

speculer
http://homepage2.nifty.com/cstation/Image/zmemo04083102.png (http://homepage2.nifty.com/cstation/Image/zmemo04083102.png) zaurus
http://homepage2.nifty.com/cstation/Image/zmemo04083101.png (http://homepage2.nifty.com/cstation/Image/zmemo04083101.png) windows
Title: 3d Programming
Post by: khieo on November 12, 2004, 08:51:19 am
Uhm, so Zsurface can't run in VGA. tks erio.

Regarding do SDL:
So let's see, if I do actually want to do some 3D programming on the zaurus...say a 3D First Person Shooter, is it possible to do it plainly just on SDL without any softGL lib like klimt?
Title: 3d Programming
Post by: rrusaw on December 02, 2004, 10:18:30 pm
Quote
Uhm, so Zsurface can't run in VGA. tks erio.

Regarding do SDL:
So let's see, if I do actually want to do some 3D programming on the zaurus...say a 3D First Person Shooter, is it possible to do it plainly just on SDL without any softGL lib like klimt?

Yeah, sorry about that. I have a patched version of the Klimt CVS tree that enables a #define to enable the use of a regular memcpy to a char** for the blitting of the display that should be more portable than the Zsurface library.

As has been noted you can always use the SDL backend. Another option is to use the klimt extensions to manually pass the backbuffer memory pointer, although then you have to handle the screen bliting manually through your own memcpy or whatnot. If any one is interested I can upload it for others to try. Yet another option is for me to get some motivation and patch Zsurface to handle full VGA displays.

Ryan