Archive for the ‘Guides’ Category

Compiling OpenGL on Mac OS X or Linux

Most linux distributions make it easy to compile programs using OpenGL. Other systems, however, aren’t so easy. Here are instructions on how to get it running in both platforms.

Ubuntu / Linux

  1. Make sure you install the opengl-mesa packages for opengl development. On ubuntu you can get them all with the following invocation:
    sudo apt-get install freeglut3-dev
  2. You should include the following #includes in your code referencing opengl:
    #  include <GL/gl.h>
    #  include <GL/glu.h>
    #  include <GL/glut.h>
  3. You should also have the following gcc cmdline flags in your makefile:
    gcc -o simple simple.c -lGL -lglut -lGLU

Mac OS X (tested on Snow Leopard)

  1. For this to work you will have to install gcc and Xcode, which should install all the required opengl/glut libraries. You can get it here.
  2. Now, you’ll have to alter all the #includes in your files to conform to the proper location. Change all your opengl #includes to the following:
    #  include <OpenGL/gl.h>
    #  include <OpenGL/glu.h>
    #  include <GLUT/glut.h>
  3. Additionally your gcc command line will need to contain the following flags to link, along with any others you might have:
    gcc -o simple simple.c -framework Carbon -framework OpenGL -framework GLUT

Cross Platform Compatibility

If you want your code to run on both, you need to get the Makefile and code to load the proper libraries depending on your system.

In all your OpenGL .c files, add the following header instead of your linux/mac includes:

#ifdef __APPLE__
#  include <OpenGL/gl.h>
#  include <OpenGL/glu.h>
#  include <GLUT/glut.h>
#else
#  include <GL/gl.h>
#  include <GL/glu.h>
#  include <GL/glut.h>
#endif

Then in your makefile, add the following before your build targets:

#default cmdline flags
LDFLAGS	= -lGL -lglut -lGLU
# Mac OS alternate cmdline link options
ifeq "$(OSTYPE)" "Darwin"
	LDFLAGS	= -framework Carbon -framework OpenGL -framework GLUT
endif

HF100 + ImageMixer Fix For Startup Freeze

So I just got a new camcorder thanks to now qualifying for the US stimulus package from back in April. I was looking around for something to help stimulate the economy and decided that I should get a camcorder while prices are low and money is high. Anyway, the HF100 is flash based and really nice. It records in full HD 1080p with pretty decent picture quality, though I have yet to record in full light setting (outside). So far I only have sort of dim shots indoors of my roommate’s cats and my ferret.

Anyway in my commitment to making a post with something useful every week, I’ve decided to share a tip with the world. Seems as though when I installed my ImageMixer 3 SE software, it would just freeze upon startup. Normally I wouldn’t mind the issue with crap proprietary software, but there is no easy way to edit .MTS/M2TS files without converting and losing quality. Since I prefer to keep the originals as well as edit them so that extra footage is chopped off, I needed to figure out what was wrong. After some digging I found the solution to my problem.

If this occurs for you, you need to install all third party codec packs you installed. I had the CCCP (Community Codec Pak), which is useful for watching MKVs. Unfortunately, that was messing up something, so I had to uninstall it. I found numerous posts talking about uninstalling codec packs, so that’s probably the way to go.

Unfortunately, that eliminates the ability to play back MKV’s in WMV. I don’t have a solution for this but I suggest installing VLC. It is wonderful and plays everything.

My first video, the high definition is better if you go straight to youtube:

 

Finally! Sync iPhone with Google Calendar — Seemlessly!

Ok, so I’ve been looking for a way to do this for a long time. I won’t spend time talking about it but rather I’ll just give you details on how to do it.

After doing this you will be able to:

  • Update Google Calendar from the Calendar app on iPhone
  • Have new events appear in your main Calendar on gCal
  • See newly added events on gCal and your iPhone
  • Get your updated Calendar WITHOUT syncing, this is all over the air

Read more

NES ROM Editing

So I did a presentation a couple years ago on NES Rom editting and I learned a lot about how to do some simple rom hacking and how old school cheat tools like game genie and game shark worked. Anyway I’ve decided to share the presentation I gave as well as all the resources I used. Everything is totally open. Everything I used to make the presentation below is included in the zip file and I even wrote up a quick little tool in .NET to translate text to dragon warrior tile entries. Anyway feel free to edit it as much as you’d like, but if you do anything cool with it I’d like to know so just shoot me an e-mail or leave some info in the comments.

Click here to download resources

 

 

Emulators for PSP Slim

I remember when I first heard about hacking your PSP to put custom firmware, I was totally excited about it. Mostly because I knew that my PSP would turn into not only a portable playstation, but a portable NES, SNES, Sega Genesis, Gameboy, GBA… you get the idea. So I decided to finally get a PSP, but by the time that I got one, they already had the newer models out, and I got a “Slim” PSP which was lighter and thinner than the original. “Alright I thought…It’s fine it’s just the newer model”. Unfortunately, a number of problems arise when it came to loading the CFW (Custom Firmware). Eventually I was able to load it but I was extremely disappointed to find out that many emulators didn’t work for Slim. I thought all hope was lost. I settled for some shitty NES version with bad resolution and moved on. That was until I found a thread post with a link to a pack of emulators that were completely compatible with the PSP Slim.

Yes you heard me right. All of these emulators work nearly 100% (as far as I’ve tested). The pack contains and emulator for nearly every kind console as well. I’ve included below the link to the File Planet mirror. I’ve also decided to host it here since I am not making use of all of my available bandwidth. Also, since emulators are not illegal, I’ll host as many as I want and no one can say anything about it :-p.

Known Compatibility Issues:

NES

* I’ve noticed that the NES emulator does not close smoothly, results in the PSP shutting off after you exit. Otherwise it seems to work fine.

Downloads:

Return top