i am new to opengl , how to work opengl in ubuntu | Unix Linux Forums | Ubuntu

  Go Back    


Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

i am new to opengl , how to work opengl in ubuntu

Ubuntu


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-27-2009
Ravikishore Ravikishore is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 21 December 2009, 1:57 AM EST
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Error i am new to opengl , how to work opengl in ubuntu

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  
Old 08-28-2009
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 26 November 2014, 1:10 PM EST
Location: Saskatchewan
Posts: 19,943
Thanks: 848
Thanked 3,420 Times in 3,205 Posts
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  
Old 08-31-2009
Ravikishore Ravikishore is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 21 December 2009, 1:57 AM EST
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
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  
Old 09-01-2009
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 26 November 2014, 1:10 PM EST
Location: Saskatchewan
Posts: 19,943
Thanks: 848
Thanked 3,420 Times in 3,205 Posts
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 05:20 PM..
Sponsored Links
    #5  
Old 09-02-2009
Ravikishore Ravikishore is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 21 December 2009, 1:57 AM EST
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Bug Installation of SDL

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  
Old 09-02-2009
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 26 November 2014, 1:10 PM EST
Location: Saskatchewan
Posts: 19,943
Thanks: 848
Thanked 3,420 Times in 3,205 Posts
That's too broad a question for me to have a useful answer to, could you be more specific?
Sponsored Links
    #7  
Old 09-03-2009
Ravikishore Ravikishore is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 21 December 2009, 1:57 AM EST
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Error what are the different applications of OpenGL

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
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 08:29 PM
OpenGL installation on Debian Linux royalibrahim UNIX for Advanced & Expert Users 0 12-10-2007 06:05 AM
Help with OpenGL in Fedora Core 4. Filth Pig Linux 3 08-26-2005 01:33 PM



All times are GMT -4. The time now is 02:33 PM.