Posts

Showing posts from October, 2009

OpenGL in SDL on Ubuntu

Supposedly SDL is better supported than GLUT for cross-platform OpenGL. There's even a Nintendo DS and Wii port for it! SDL is right in the Ubuntu repository, so it is just as easy to install as GLUT was: sudo aptitude install libsdl-dev To test it out, this time I went to NeHe Lesson 2 . There is a port for Linux/SDL . The same GL header files are needed, but this time SDL is needed as well: #include <GL/gl.h> #include <GL/glu.h> #include "SDL.h" It looks like there are a couple more flags needed, the part at the end is SDL, I'm not sure why it looks that way. gcc lesson02.c -lGL -lGLU `sdl-config --cflags --libs`

GLUT on Ubuntu: Basics

To install GLUT: sudo aptitude install freeglut3 freeglut3-dev This will install the OpenGL header files to /usr/include/GL/ And the library objects to /usr/lib/libglut.a With all that taken care of now you just need a quick sample app to see if it worked, I googled "glut hello world" and this was the second result . I needed to add "#include ". Also notice that GLUT is included like "#include ". I then renamed it to helloworld.cpp and was able to compile as follows: g++ helloworld.cpp -lglut That's it, now you're ready to figure out something cool to make.

Crappy Volume Control

Image
My dad was kind enough to provide me with a nice db systems amplifier, but the thing didn't have any volume control. I found my source (a PS3) to be lacking in range settings so I needed to come up with some sort of pre-amp. What you see below is the result. Nothing more than a dual potentiometer stuck inside an MDF box, well almost a box, I never built the top or rear of the thing.

DVD Rip for PS3 through Mediatomb

Image
For episodic content I like to rip my DVD's so that I can play them off my mediacenter (MediaTomb enabled PS3) one after another without worrying about disks. For Linux I use an application called "DVD::Rip" which makes this process fairly simple:

Job control on UNIX systems

I've been using control-z and fg to stop / resume programs from the UNIX terminal for as long as I've been using that environment. The problem is that I've only used those two commands so my usual workflow has always been "stack based". Meaning I have always used fg to resume the most recent program that I stopped. Long story short, there is another command called jobs which enumerates all the programs which have been stopped. At this point you can use fg # to resume whichever job you want. What a concept. I found this web page had a nice description of all these commands: http://acs.ucsd.edu/info/jobctrl.shtml