OpenGL Development on Windows XP

February 5th, 2010 — 6:19pm

Needed an OpenGL development environment for my Computer Graphics class. These are my notes on how to prepare a clean install of Windows XP for doing OpenGL development using Microsoft Visual Studio Express C++ Edition.

1. Installed Visual Studio Express 2008 C++ Edition.
2. Verified that video driver had installed opengl32.dll in %WinDir%\System.
3. Downloaded GLUT zip file (dll, lib and header files) from http://www.xmission.com/~nate/glut.html.
4. Copied glut32.dll to %WinDir%\System.
5. Copied glut32.lib to $(MSDevDir)\..\..\VC98\lib (C:\Program Files\Microsoft Visual Studio 9.0\VC\lib).
6. Copied glut.h to $(MSDevDir)\..\..\VC98\include\GL.
7. Downloaded glext.h, glxext.h, and wglext.h from http://www.opengl.org/registry.
8. Copied glext.h, glxext.h, and wglext.h into C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\.
9. Created new Visual C++ Win32 Console Application (unchecked Precompiled headers).
a. Delete all the generated files.
10. Added HelloOpenGL sample .c file and compile.

#include <windows.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glut.h>
#include <stdio.h>
#include <windows.h>#include <GL/gl.h>#include <GL/glext.h>#include <GL/glut.h>
#include <stdio.h>
void drawPolygons() {
glBegin(GL_TRIANGLES);
glColor3f(1.0, 0.0, 0.0);
glVertex2f(1.0, 0.0);
glVertex2f(1.0, 1.0);
glVertex2f(0.0, 1.0);
glEnd();
}
void display(void) {
glClear(GL_COLOR_BUFFER_BIT);
drawPolygons();
glFlush();
}
void init() {
glClearColor(0.0, 0.0, 0.0, 0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(-5.0, 5.0, -5.0, 5.0);
}
int main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500, 500);
glutInitWindowPosition(0, 0);
glutCreateWindow("simple");
glutDisplayFunc(display);
init();
glutMainLoop();
return 0;
}

Comment » | Software

Announcing the Red Dot Calendar

January 5th, 2010 — 8:29am

Over the Christmas holiday, I put together a free, web-based application called the Red Dot Calendar.  The idea behind the website is simple… send a reminder to girls or guys just prior to the start of a woman’s period.  This helps remind women that they may need to go shopping and helps remind guys that they may need to go camping (just kidding… sort of).

The actual coding took a bit more time than I anticipated.  As usual, almost daily I “discovered” new features the site would need.

The service is free and I will not be placing any ads on the site, unlike every other service I saw out there.  The reminders are short and to the point, again without ads.  In the future, I may include a short, text-only ad at the end of the email reminder.  Or I may not.  Time will tell.

The thing I like most about the site is its simplicity.  I deliberately designed a site with minimal use of graphics to save on bandwidth.  This results in lower costs for me which makes it easier to keep it free to the users.

Regardless of how “profitable” this site may or may not be, I plan to keep it running for a long time.  My wife is it’s first subscriber (I’m the second) and it’s currently running off the excess bandwidth of my server anyway, so it’s costing me virtually nothing.

Check out the site and if you have any suggestions on how to improve the service, leave a comment below.

Comment » | Software

Researcher Translation

December 21st, 2009 — 12:15am

When I graduate in three years, I’ll let you know if this is accurate or not…

Comment » | Off Topic

A Critical Examination of Evidence-Based Scheduling

December 6th, 2009 — 1:53pm

As part of the class I’m taking on software process, I was required to write a short paper on a course-related topic.  The topic I chose was Joel Spolsky’s Evidence-Based Scheduling (EBS) technique.

I approached the topic with a critical eye toward its aspects, strengths, and weaknesses.  Hopefully, this could serve as an unbiased reference for someone interested in the topic of task scheduling, EBS, and Monte Carlo style simulations.  Keep in mind that this paper was not written to be submitted to a journal publication and, therefore, is more of an expert opinion on the subject, rather than a definitive piece of research.

The paper is available online and as a PDF.

Note: The online version has a few formatting problems, for which I blame Microsoft Word, since I let it do the conversion.  The PDF version is the truest rendering of the work.

2 comments » | Software

Windows 7 for my Media Center PC

October 23rd, 2009 — 9:57am

Even though I gave up on Windows 7 for my laptop, I haven’t give up on it all together.  I just purchased and downloaded a fresh copy of Windows 7 from Digital River.  Thanks to my status as a student, it only cost $30.  I plan to install it tonight on the PC in my media room and finally get rid on that hideous monstrosity called Vista.

Comment » | Software

Ravioli Code

October 23rd, 2009 — 9:51am

I had never heard of ravioli code until I read this article by Artem Smirnov.  Personally, I think it’s a great analogy for object-oriented code.  Now I just have to find opportunities to use the phrase…

Comment » | Software

HH Gregg is Awesome

September 27th, 2009 — 7:32pm

Let me tell you why I think HH Gregg is awesome.

A couple of months ago we purchased a 52″ LCD flat panel television from HH Gregg.  It was very nice (notice the past tense).  Two weeks ago, some dirtbags broke into our house and stole it.  The police have a few leads, but I’m not holding my breath.

Since we liked the TV so much — and since State Farm is paying for a new one — we went back to HH Gregg.  I told the manager what happened and said I wanted the exact same TV we had before.  He checked the computer and let us know that they didn’t have the exact same model, but they had the slightly newer version.  I asked him if it was more expensive.  He said, No, it’s about the same price, but I’ll be giving it to you at cost since I refuse to profit off of other’s misfortune.

How friggin cool is that!  Needless to say, we will be going back there again.

Note to Dirtbags: We now have an alarm system and video surveillance, so don’t bother coming around to try and steal the new one.  You’ll just get caught.  And, oh yeah, you suck!

Comment » | Off Topic

First Week of School

August 25th, 2009 — 8:46am

So the first week of school at Auburn as a PhD student has left me with a few new accomplishments under my belt.

  1. Six minutes into my first (ever) PhD class, I derailed the professor’s train of thought with my cell phone ringing.  Oh yeah, he’s also the Department Head.
  2. I started learning a new programming language: Python.
  3. I got the swine flu.

All in all, I’d say things are starting off with a bang!

2 comments » | Off Topic

Software Capital

August 21st, 2009 — 7:57am

In his book Software as Capital, Howard Baetjer comments…

Because software, like all capital, is embodied knowledge, and because that knowledge is initially dispersed, tacit, latent, and incomplete in large measure, software development is a social learning process.  The process is a dialogue in which the knowledge that must become the software is brought together and embodied in the software.”

Baetjer goes on to describe how software evolves, through iterations, as more and more useful knowledge is added.

This process has a great deal in common with hiring and cultivating a new employee in a large organization.  Initially, the new employee can be seen as an empty vessel to be filled with knowledge.  On the first day of work, we add fundamental knowledge, such as where the break room and bathrooms are located.  In the weeks that follow, the new employee learns about culture and how we, as a company, do things.  As weeks turn into months, the new employee learns our business processes, becomes “functional” and can begin to provide some small return on the investment we have made.  Finally, as months turn into years, our employee transforms into a valuable resources that more recent hires turn to as a mentor.

The larger the organization, the more specialized our employee will become.  If fact, many employees of just a few years will quickly surpass in knowledge employees with decades of experience, due to a tendency towards specialization.

Now, back to software…

Software behaves in the same way.  In the first days (or weeks) or development, we define its scope and requirements.  In the months (or years) that follow, we construct, test, and deploy the software, entering a cycle of continual enhancement and improvement.  Eventually, the software embodies the sum of knowledge in its area of specialization, surpassing the masters that taught it.

Herein, lies a problem very similar to one faced by Human Resources.  What to do when the software (employee) falls from favor and must be replaced.  How do we extract that body of knowledge?  Where do we put it?  How much knowledge will be lost?

Software, like most long term employees, cannot simply hand you the sum of their knowledge and experiences.  Many times an employee simply knows the answer without understanding the how they know it.  And anyone who has worked on a rewrite of software understands that, although the code embodies the knowledge, the knowledge cannot be obtained by reading the code.

How do you think the knowledge capital of software can be extracted and retained for future generations?

Comment » | Software

Ubuntu on the Thinkpad X41

August 14th, 2009 — 3:11pm

After watching performance continue to drop on my Thinkpad X41 tablet PC, I ditched Windows 7 and switched to Ubuntu 9.04 (a.k.a. – Jaunty Jackalope).  The upgrade to Ubuntu took less than an hour and there were no obvious problems.  I have wireless connectivity, the Sun Java 6 JDK installed, a working Skype client, and Subversion (actually RapidSVN).

Getting audio working with Skype was a bit of work, but overall, I’m very happy with the experience.

Update #1: I discovered the volume buttons control the speakers at a hardware level and do not sync with the software volume (kinda like the volume knob of your speakers).  And using the mute button kills the audio completely, requiring a reboot.  Oh well, everything can’t be perfect.

Update #2: Got the swivel screen working so that the display rotates when I rotate the screen.  Awesome instructions can be found over at ThinkWiki.

Update #3: Okay, so the mute button is not a toggle.  It just sends the volume level to zero and you use the increase volume button to raise it back up again.  Thanks to syzygy for the tip.

2 comments » | Hardware, Software

Back to top