Archive for February 2010


Assembly Programming in Visual Studio 2008

February 24th, 2010 — 9:53am

Here’s the steps I went through to set up Visual Studio for assembly programming under Windows 7 64-bit.  Unfortunately, it only builds 32-bit executables.

1. Install Visual C++ 2008 Express Edition.
2. Download Irvine samples (“Example programs and link libraries (designed for Visual Studio 2008)”) and install in C:\Irvine.
3. Copy Irvine lib and include files to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ (*.lib files go in lib folder and *.inc files go in the include folder).
4. Open an Irvine sample project.
5. Compile.

To create a new project, simply use the Save As option from one of the existing Irvine solutions/projects.  It is much easier than trying to create a project from scratch.

Comment » | Software

Amazing Grace

February 19th, 2010 — 6:42pm

My mother-in-law, Ruth, passed away this week.  My brother’s wife, Carla, was generous enough to sing at Ruth’s funeral.  She was amazing.  I heard angels.

1 comment » | Off Topic

Line Collision Detection Basics

February 11th, 2010 — 7:40pm

Great blog post that explains the basics of collision detection for two lines in 2D space.

http://www.johanvanmol.org/content/view/39/37/1/2/

Update: Used this information to add collision detection to my second assignment in COMP 6400 – Fundamentals of Computer Graphics.  Let’s hear it for extra credit!

Comment » | Software

Gmail, Bills, and Labels

February 10th, 2010 — 7:50am

A while back I set up rules in Gmail to apply the label Bill to any email notifying me I have a bill due.  I try to do most everything paperless, so I don’t usually get a bill in the regular mail.  The Bill label helped reminder me not to archive it and forget to pay.

I prefer not to pay something the moment it comes in, since it might not be due for another two or three weeks.  In fact, I prefer to maximize the interest my money can earn and paying a bill way early goes against that.  Recently, however, I’ve found myself repeatedly logging into my online accounts to see when something is due.  I may prefer to keep my money as long as possible, but I also prefer not to pay late fees.

This morning, I hit upon a way to “store” the due date of a bill right in Gmail using labels.  I simply create a new label with the month and day the bill is due and assign it to the email.  Google makes this really simple and it requires only a few clicks.  If you’ve never done this before, I’ve given you instructions just below this screenshot.

Label bills with due date in Gmail

To create a label in Gmail:
1) Open the email message in Gmail.
2) Click the Labels button to open the Labels drop-down list.
3) Click Create New at the bottom of the list.
4) Enter the due date for the bill (i.e. – Mar 31) and click Ok.

1 comment » | Off Topic, Technology

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

Back to top