Pages

Friday, July 17, 2009

Python Programming for Beginners

To start with Python Programming, have a look at glance at the article from Linux journal Python Programming for Beginners

Some other resources can help us to learn Python as follows:
Dive in Python - From novice to pro
Thinking in Python - One of the famous series of books
Python Documentation
How to Think Like a Computer Scientist: Learning with Python v2nd Edition documentation

OpenGL Programming in Linux: GLX and Xlib

Xlib is a library which provides functions for applications running under the X Window System (also referred to as X). This includes window management as well as event handling. X is a network orientated system: An application which is running on computer A can send its graphical output to computer B, which is located somewhere else in the network (the network can be a LAN as well as the internet), and can receive events like keyboard or mouse input from computer B. This requires that a program called the "X-Server" is running on both computers. In Linux, the X-server is started with the command startx. You will most probably not have to start the X-server manually, because most Linux Distributions will set up the system to automatically start X after booting.

In the following, a small program framework will be developed, which uses the GLX extension to the X windows system. Only little knowledge of X will be needed; for a comprehensive introduction to X the "Xlib Programming Manual" by Adrian Nye can be recommended.

The program starts with the inclusion of the header files:
More...

Another tutorial about OpenGL Programming in Linux is here

Drawing simple shapes with perspective

Drawing simple shapes with perspective

Shared via AddThis

How To Start With Cpp In Linux

http://www.socher.org/index.php/Main/HowToStartWithCppInLinux

OpenGL Programming

Introduction

freeglut vs OpenGlut
freeglut and OpenGlut are open sources to the OpenGL Utility Toolkit (GLUT) library. OpenGL is a sibling of freeglut which belongs to some members of freeglut team.

freeglut vs GLUT
GLUT (pronounced like the glut in gluttony) is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL programming. GLUT provides a portable API so you can write a single OpenGL program that works across all PC and workstation OS platforms.

freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to support the sample programs in the second edition OpenGL 'RedBook'. Since then, GLUT has been used in a wide variety of practical applications because it is simple, widely available and highly portable.

GLUT was originally to get a window open as fast as possible with least amount of code possible (for quick OpenGL programs) and for simple keyboard interface.

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.

freeglut is released under the X-Consortium license.

SDL
SDL is also super-portable and very commonly used. SDL has a working fullscreen mode. SDL on the other hand is designed to be used more extensively

(More detailed: http://archives.seul.org/linuxgames/Jun-2002/msg00019.html)
These are useful links
  1. OpenGL, SDL, graphics, games
  2. Beginning Game Programming
  3. Computer Graphics (A course of Computer Graphics from MIT OpenCourseWare)

  4. OpenGL with Java and here is Tutorials

Unable to create direct context rendering for window

When we run a OpenGL program in Ubuntu, there is an error below:
"freeglut (./a.out): Unable to create direct context rendering for window ''
This may hurt performance."
The solution is: to install dri and drivers correct for computer