Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: IDE OpenGL

Hybrid View

  1. #1
    Join Date
    May 2007
    Beans
    50

    IDE OpenGL

    Hi everyone,
    I open this Thread because I would like to learn the OpenGl, but I do not know where and which IDE I should use
    Can someone help me please?
    Bye and Thanks

  2. #2
    Join Date
    Oct 2006
    Location
    Austin, Texas
    Beans
    2,712
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: IDE OpenGL

    With OpenGL it doesn't matter what IDE you use. What language are you planning to use?

  3. #3
    Join Date
    May 2007
    Beans
    50

    Re: IDE OpenGL

    Hi,
    I am going to use C++

    Could you tell me also what packages should I install to work with opengl please?
    Bye and thx
    Last edited by zergling; October 25th, 2007 at 06:19 AM.

  4. #4
    Join Date
    Oct 2006
    Location
    Austin, Texas
    Beans
    2,712
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: IDE OpenGL

    Quote Originally Posted by zergling View Post
    Hi,
    I am going to use C++

    Could you tell me also what packages should I install to work with opengl please?
    Bye and thx
    SDL is a pretty good option for using OpenGL with C++, this will install OpenGL and SDL:
    Code:
    sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libsdl1.2-dev
    That's all you'll need to build SDL+OpenGL applications. SDL also has a bunch of additional libraries for things like image loading, text rendering, networking, audio, etc. It's also really portable and commonly used.

  5. #5
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: IDE OpenGL

    The latest version is here
    http://www.futuredesktop.org/codeblo...untu_9.04.html

    -------------------------------------------------------------------------------------------------------------------------------------

    Installation of Code::Blocks C/C++ IDE on ubuntu 8.04 (Hardy Heron):
    See: http://www.futuredesktop.org/codeblo...untu_8.04.html

    Pictures:

    -------------------------------------------------------------------------------------------------------------------------------------

    Installation of Code::Blocks C/C++ IDE on ubuntu 7.10 (Gutsy):
    http://www.codeblocks.org/



    LGP provides fresh Ubuntu-packages for codeblocks. See: http://lgp203.free.fr/spip/spip.php?article1
    and http://lgp203.free.fr/spip/spip.php?article1#nb2

    You need to edit your /etc/apt/sources.list file and add the following repository lines there.
    $ sudo gedit /etc/apt/sources.list
    Code:
    ## Repository for codeblocks IDE and wxWidgets 2.8.6 
    ## Note: from revision 4592, the nightly builds will depend/based upon wxWidgets 2.8.6.
    deb http://lgp203.free.fr/ubuntu/ gutsy  universe
    deb http://apt.wxwidgets.org/ gutsy-wx main
    Add these security keys to your package system (the packages are signed with these keys). Run the commands
    $ wget -q http://lgp203.free.fr/public.key -O- | sudo apt-key add -
    $ wget -q http://apt.wxwidgets.org/key.asc -O- | sudo apt-key add -


    Then install
    $ sudo apt-get update
    $ sudo apt-get install libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib

    For code development, you'll also need some additional packages. Install
    $ sudo apt-get install build-essential gdb subversion

    $ sudo apt-get install automake autoconf libtool

    $ sudo apt-get install libgtk2.0-dev libxmu-dev libxxf86vm-dev

    These package are for programming with the wxWidgets GUI toolkit.
    $ sudo apt-get install libwxbase2.8-dev wx2.8-headers libwxgtk2.8-dev
    -------------------

    Then start the codeblocks IDE from the menu or CLI:
    $ codeblocks

    -------------------
    Below are some important notes. Especially read notes 1- 5.
    Use the (glut) freeglut library to develope portable OpenGL applications.
    Code::Blocks has a GLUT project wizard. Use it to create your first OpenGL project. Build & run.

    -------------------

    Important notes.
    Alguns comentários importantes.

    Note 1:
    If you want to develope OpenGL (glut...) applications, install FreeGlut first Type
    $ sudo apt-get install freeglut3 freeglut3-dev

    Select "GLUT project" in the codeblocks' project wizard.
    An important tip: Say: /usr when it asks "Please, Select GLUT's location:".
    See picture
    Read also the Note 5) below.
    ------------------------------

    Note 2 !:
    If you want to develope GLFW applications, install GLFW first ( http://glfw.sourceforge.net/ )
    Read also this posting...
    ------------------------------

    Note 3 , c-cpp-reference:
    Do not forget to install the "c-cpp-reference" manuals. Run this command:
    $ sudo apt-get install c-cpp-reference

    OR use your Synaptic Package Manager and get the package. It will put some HTML help files in the /usr/share/doc/c-cpp-reference/ directory.
    Start Firefox and point it to /usr/share/doc/c-cpp-reference/index.html

    Also these web C/C++ sites are very helpful:
    http://www.cppreference.com/
    +
    http://www.cplusplus.com
    +
    http://www.yolinux.com/TUTORIALS/LinuxTutorialC++.html

    + The ultimate collection of C++ tutorials
    http://ubuntuforums.org/showthread.php?t=333867#2 and C++ wikibook...
    + STL (Standard Template Library) guide
    http://www.yolinux.com/TUTORIALS/Lin...ialC++STL.html (simple samples test-std1.cpp and test-std2.cpp )
    --------------------------------------------------------------
    Note 4 , <nothing so far>

    --------------------------------------------------------------
    Note 5 , Important GLUT / OpenGL guides:
    Read note 1) first, then study
    Redbook.html
    ( Redbook.... [ direct link... ] )
    Bluebook.html [ direct link... ]
    http://www.opengl.org/code/category/C19/
    http://nehe.gamedev.net/
    http://ubuntuforums.org/showthread.php?t=333867#8 Especially good source of programming guides !
    http://www.gamedev.net ( example: how to run the lessons... )
    http://www.glprogramming.com
    http://ubuntu-gamedev.wikispaces.com ( Ubuntu games )
    http://www.glchronicles.mccolm.org (GL Chronicles)

    http://www.libsdl.org Simple Direct Media Layer (Excellent 2D library. Has also OpenGL support )
    http://lazyfoo.net/SDL_tutorials/index.php
    or try
    http://g2.sourceforge.net/
    ---
    GLUI = OpenGL based GUI library (buttons, edit boxes, list boxes etc...)
    http://glui.sourceforge.net/

    FTGL = Render text (fonts) in OpenGL
    http://homepages.paradise.net.nz/henryj/code/#FTGL

    Animated OpenGL graphical UI
    http://clutter-project.org (Clutter)
    https://code.fluendo.com/pigment/trac (and Pigment)

    OpenAL sound
    http://www.openal.org

    Ubuntu gamers' corner
    http://ubuntu-gamedev.wikispaces.com
    --------------------------------------------------------------

    Note 6 , wxWidgets examples !
    WxWidgets is a multi platform GUI toolkit: http://www.wxwidgets.org

    First, get the package wx2.8-examples
    $ sudo apt-get install wx2.8-examples

    The package puts the examples into /usr/share/doc/wx2.8-examples/examples/ directory. It's a compressed tar-ball which you have to unpack/untar.
    ( If you have the older 2.6 version then the directory is /usr/share/doc/wx2.6-examples/examples/ )

    Run the "unpack_examples.sh" script (in the same directory) to unpack the samples in to your $HOME directory.
    For example, run:
    $ /usr/share/doc/wx2.8-examples/examples/unpack_examples.sh $HOME/wxwidgets2.8

    And it will unpack & put the samples in to $HOME/wxwidgets2.8/samples/ folder.

    You can compile and run the examples directly from the command line.
    The compilaton requires wxWidgets' development headers and libraries. You will need packages: libwxbase2.8-dev wx2.8-headers libwxgtk2.8-dev

    As an example let's compile the /popup sample code.
    $ cd $HOME/wxwidgets2.8/samples/popup/

    Compile the project.
    $ make

    Run it
    $ ./popup
    ./ means the current directory. Yu must include it, otherwise the shell will not find the program, because by default, the current directory is NOT in the $PATH.
    $ echo $PATH

    Now, try to compile and run the other wxWidgets examples as well.

    Study also the wxWidgets' documentation package wx2.8-doc.
    $ apt-cache search wx2.8-doc
    wx2.8-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation)

    Install it and list the documentation (html) files
    $ dpkg -L wx2.8-doc
    $ dpkg -L wx2.8-doc | grep index

    Of course, the documentation is available online too...

    + read http://zetcode.com/tutorials/wxwidgetstutorial/
    and http://en.wikibooks.org/wiki/WxWidgets
    --------------------------------------------------------------

    Note 7 , Necessary packages to develope SDL-applications.
    SDL stands for Simple DirectMedia Layer...
    It's a framework to greate portable 2D graphics applications. It also supports OpenGL.

    First, list all packages that belong to the SDL family.
    $ apt-cache search libsdl | grep dev
    The "-dev" packages contain the header (include) files and dynamic libraries for app development. You'll need them.

    Install at least these basic packages. These give you a good start.
    $ sudo aptitude install libsdl1.2-dev libsdl-image1.2-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev
    However, the most basic apps need only "libsdl1.2-dev".

    Then create a basic SDL-application via the Code::Blocks' project wizard (select SDL project).


    Other 2D/3D frameworks...
    --------------------------------------------------------------

    Note 8 , Make beautiful graphics with the Cairo
    http://cairographics.org/samples/ Cairo graphics !

    MacSlow’s Cairo-Clock (a good example)
    http://macslow.thepimp.net/?page_id=23
    --------------------------------------------------------------

    Note 9 , Other important programming resources: http://www.futuredesktop.org/opportunities.html
    Kernel, driver and module programmer's heaven: http://www.futuredesktop.org/kernel.html

    --------------------------------------------------------------

    Note 10 , Essential manual pages... that we developers often forget to install and use.

    What manual pages does Ubuntu (or any other distro) offer?
    $ apt-cache search manpages
    ...
    manpages - Manual pages about using a GNU/Linux system
    manpages-dev - Manual pages about using GNU/Linux for development
    manpages-posix - Manual pages about using POSIX system
    manpages-posix-dev - Manual pages about using a POSIX system for development

    Install all manpages*dev packages
    $ sudo apt-get install manpages-dev manpages-posix-dev

    Note: This command vill tell you what manual sections (1 - 8 ) the package covers.
    $ apt-cache show manpages-posix-dev

    Now search help:
    $ man 3 fprintf
    $ man sqrt
    $ man pthread_create
    $ man sem_init

    $ man 3 socket
    $ man 7 pthreads
    $ man 7 sem_overview

    Use also whatis and apropos commands (eg. to reveal the section number)
    $ whatis pthread_create

    $ apropos pthread_create
    $ apropos pthread
    --------------------------------------------------------------

    Note 11 , "How to become a real hacker" by Eric S. Raymond, updated 2007 version.
    http://www.catb.org/~esr/faqs/hacker-howto.html
    --------------------------------------------------------------

    Note 12 , A tip for zooming text in Code::Blocks IDE.
    Press CNTR + NUMPAD + or NUMPAD - keys to zoom the text.
    NUMPAD +/- are tangents on the numerical keypad.
    --------------------------------------------------------------

    Note 13 , Linux, speak to me. Make your machine talk. YES TALK !
    http://ubuntuforums.org/showthread.php?t=291919
    --------------------------------------------------------------

    Note 14 77 useful Linux commands.
    http://searchenterpriselinux.techtar...282259,00.html
    --------------------------------------------------------------

    Note 15 ,
    Windows converts, read this: http://ubuntuforums.org/showthread.php?t=554070

    All users, read this: http://ubuntuforums.org/showthread.php?t=554070
    Last edited by moma; June 1st, 2009 at 12:55 PM.

  6. #6

    Re: IDE OpenGL

    Hi, I just followed the Hardy Heron steps for installing Code::Blocks, freeglut, and wxwidgets. I tried compiling the sample and everything runs fine except for one small but annoying problem: The GLUT window is missing the title bar. It is actually there but it just doesn't show it meaning I can click a non-existant "x" and it will close the window. I tried compiling it using Code::Blocks and gcc using -lglut if that helps. Both do the same thing. Comparing what I see on my screen and the posted screenshot, the difference is the title bar obviously and the fact that I have a terminal type thing running which is what I think is wrong. Any help would be appreciated. Thanks in advance.

    Sorry for the long post.

  7. #7
    Join Date
    Jun 2008
    Beans
    2

    Re: IDE OpenGL

    I also suggest Code::Blocks, it's a great IDE and includes project wizards for Opengl, GLUT and SDL.

    Please check a small howto:

    fabianmejia.blogspot.com

  8. #8
    Join Date
    May 2007
    Beans
    50

    Re: IDE OpenGL

    Hi guys, I would like to ask you something:
    What is the difference between opengl, glut and glfw?
    Is glut in c++ and gflw in c? What about just opengl?

    I installed the glfw but I do not know what to put when the codeblock ask me Please select a GLFW's location....

    Thx a lot both of you I REALLY appreciated your help !

    P.S. May I start porgramming in OpenGL after covering just the basics of C++ such as loops, functions and array?
    Or, do I need more C++?
    Last edited by zergling; October 25th, 2007 at 07:17 PM.

  9. #9
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: IDE OpenGL

    Re-hello,

    From the http://freeglut.sourceforge.net web page:
    GLUT (and hence freeglut) framework let you Create and manage Windows containing OpenGL contexts on a wide range of platforms and also Read the mouse, Handle keyboard and joystick functions transparently.
    So with freeglut, you can port your code to several platforms (Linux, Unix, Windows, Mac) and be sure that Keyboard, Mouse and the basic Window functions just work. But OpenGL is OpenGL no matter you use it from freeglut or from other frameworks. OpenGL is OpenGL and need to be learned.
    ----------------

    Ref. your GLFW question.
    This is howto install GLFW (it's not in the Ubuntu's package system).

    $ wget http://prdownloads.sourceforge.net/g...fw-2.6.tar.bz2
    $ tar -xvjf glfw-2.6.tar.bz2
    $ cd glfw

    $ make x11

    $ PREFIX=/usr sudo make x11-install

    $ sudo ldconfig
    --------

    in the Code::Blocks GLFW's project wizard, say /usr when it asks GLFW's location.
    Because libraries inhabit the /usr/lib directory and include files are in /usr/include/.


    EDIT:
    The example code that is generated by the GLFW's project wizard needs also link to "libxrandr.so" library.
    It means that you must install the libxrandr-dev package.
    $ sudo apt-get install libxrandr-dev

    And in Code::Blocks, use the wizard to create the sample code, browse to the menu selection Project -> Build options.... and set the library under "Other link options"
    See picture:
    --------

    I recomend that you choose freeglut over GLFW because freeglut is more common, well known and tested library. Also supported by Ubuntu.
    Both frameworks work well from C and C++.
    Last edited by moma; January 12th, 2008 at 10:25 AM.

  10. #10
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: IDE OpenGL

    Duplicate posting. How to delete this?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •