|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
i am new to opengl, how to work openGL in ubuntu ,, i am not getting which packages as to be install and how to install those packages. and how to work with small programs.. Please guide me ,,, it will appriceated ... |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Ubuntu is really the wrong platform for programming... There's such a heavy snow of *-dev packages needed to do anything at all. You will of course need to install gcc and perhaps g++. needed libraries might begin with libgl1-mesa-dev, glutg3-dev, libglui-dev, libglut3-dev... Not having an ubuntu machine I can't say how many more would be necessary to install to stop it complaining about missing headers. Also, using SDL would be a lot easier than using OpenGL raw. It sets it up for you so you can use OpenGL raw, but in a relatively simple and platform-independent way. There are many tutorials for SDL opengl available on the internet.
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Hi Sir,
I worked with c programs in ubuntu for openGL,,, now im trying to execute the c++ programs for openGL ,,,, while compiling its showing error message as root@lxdevenv:/usr/include/GL# g++ -c -I$QTDIR/include ravvv.cpp ravvv.cpp:1:18: error: kapp.h: No such file or directory ravvv.cpp:2:24: error: qwidget.h: No such file or directory ravvv.cpp:3:75: error: qpainter.h: No such file or directory ravvv.cpp:4:23: error: qimage.h: No such file or directory ravvv.cpp:7: error: expected class-name before ‘{’ token ravvv.cpp:8: error: expected `}' at end of input ravvv.cpp:8: error: expected unqualified-id at end of input root@lxdevenv:/usr/include/GL# and my code is #include <kapp.h> #include <qwidget.h> #include <qpainter.h> // The QPainter class draws graphics on widgets. #include <qimage.h> class MyWindow : public QWidget { public: // Constructor for the window, just call the QWidget constructor MyWindow() : QWidget() { } protected: void paintEvent(QPaintEvent *); }; // This function is called when the window area must be updated. // Load and view the image void MyWindow: aintEvent(QPaintEvent *ev){ // Load the image that we want to show QImage image; if (image.load("test.jpg", 0)) // If the image was loaded, { // Show the image. // Draw graphics in this window QPainter paint(this); // Draw the image we loaded on the window paint.drawImage(0, 0, image, 0, 0, image.width(), image.height()); } } int main(int argc, char **argv) { KApplication app(argc, argv) // Create the window MyWindow window; app.setMainWidget(&window); window.setCaption("ImageIO Example"); window.setGeometry(100,100,300,300); window.show(); return app.exec(); } guide me ..it will appreciated .... |
|
#4
|
|||
|
|||
|
It looks like you need qt-dev, or something like qt-dev.
This code will only work with qt by the way, which is wholly unnecessary for OpenGL. It's probably a bad idea in general to tie functionality that has nothing to do with a GUI into a GUI, as it will make it very hard to make the code work anywhere else. You need X and mesa and SDL; write for that and your GL code should work anywhere. here's a better introduction I think. Took me a while to find it. SDL is nearly everywhere these days, unlike qt. Last edited by Corona688; 09-01-2009 at 04:20 PM.. |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Hi Sir,
I installed SDL and executed the small program ,,, its executed without any error ,, after that i downloaded SDLgears-1.0.2.tar.gz and i did ./configured it .. done make after that i did ./SDLgears I got the output ,,, Thanking You Sir ,,, ---------- Post updated at 12:36 AM ---------- Previous update was at 12:32 AM ---------- Hi Sir, As im new to OpenGL im not getting which are the different applications for each Features in openGL .. if possible give me the example for different applications ,, Thanking You, |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
That's too broad a question for me to have a useful answer to, could you be more specific?
|
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Hi Sir,
What i meant to say is what are the different applications where openGL is Used.. I need programming(c language) examples for each applications ,,,, |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need to install opengl for GXT4500. | xeonbb | AIX | 1 | 05-25-2008 07:29 PM |
| OpenGL installation on Debian Linux | royalibrahim | UNIX for Advanced & Expert Users | 0 | 12-10-2007 05:05 AM |
| Help with OpenGL in Fedora Core 4. | Filth Pig | Linux | 3 | 08-26-2005 12:33 PM |
|
|