Michael Chase’s Weblog

November 17, 2010

Programming Gems: Debugging browser plugins with Visual Studio 2008

Filed under: Programming — mbrazell @ 4:01 pm

In order to debug a browser plugin with Visual Studio 2008, oftentimes it is necessary to force the browser to run in single-process mode.  Following are methods to force single-process mode in popular browsers:

Chrome/Chromium:  use the –single-process command line switch.

Firefox:  set dom.ipc.plugins.enabled in about:config to false.

Internet Explorer:  in the system registry, under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main, add “TabProcGrowth” as a DWORD value and set to zero (0).

Javascript Gems: Hitting breakpoints in Internet Explorer 8 using Visual Studio 2008

Filed under: Javascript — mbrazell @ 3:55 pm

Checklist for hitting breakpoints when debugging javascript in Visual Studio 2008 and Internet Explorer 8:

1)  Uncheck “Disable script debugging (Internet Explorer)” found in Tools->Internet Options->Advanced->Settings->Browsing.

2)  Add “debugger” before the line of script you wish to break at.

November 16, 2010

Javascript Gems: Dynamically change element’s onclick event

Filed under: Javascript — mbrazell @ 9:19 pm

var input = document.createElement(“input”);

input.onclick = someFunction; // not someFunction(); or “someFunction()”;

- OR -

input.onclick = function() { };

It must be a pointer to the function, not a function call or string.  Also note that the event is named “onclick”, not “onClick”.

Hello world! (redux)

Filed under: Me — mbrazell @ 8:54 pm

I’m back bitches.

May 5, 2008

BwCore3 (or BwCore2_5)

Filed under: Uncategorized — mbrazell @ 2:40 pm
Tags: , , , , ,

Today I start on the next version of BwCore.  Several significant features will be added, including use of the factory and registry pattern for object instantiation, and support for multiple threads.

The re-write will be done in Visual Studio 2005, to ensure the ability to compile with VS 2005 from the get-go.

Kevin, Robert, and Ted are assisting in the design, which will hopefully give us a more maintainable code base, allow for easier addition of features, and improve performance.

Good luck toward this effort!

April 13, 2008

Wiimote Mouse

Filed under: Uncategorized — mbrazell @ 9:35 pm
Tags: , , , , , ,

I have just completed an executable that allows the user to control the cursor (mouse) with a Wiimote. They only need support for Bluetooth, a Wii sensor bar (or an infrared light source), and a Wiimote.

I came up with an effective (and possibly novel) way of reducing jitter (the Wiimote is very sensitive) using the accelerometer within the Wiimote. If the user is pointing at a specific location, the Wiimote will be relatively still, and the accelerometer’s acceleration vector will also be relatively stable. Hence, if the accelerometer isn’t changing (much), I don’t send mouse move messages to the OS.

Here’s a screen-shot of the interface:

Wiimote Mouse Interface

Pretty spiffy, eh?

What’s also cool is this is my first C# program. I love C# and Visual Studio 2005 so far!

March 28, 2008

A Wonderful Life

Filed under: Uncategorized — mbrazell @ 7:00 pm
Tags: , , ,

Is the title of a dreamy trance song by Carl Craig, on an album called “Back to Mine”, by Everything But The Girl (EBTG). I remember when I bought the album I was initially disappointed, because I thought it was going to be music by EBTG, but it turned out to be a compilation of music they love, hence the album title. However, my disappointment quickly subsided when I heard the music. It’s wonderful to hear the music a band you like listens to themselves, especially when you end up loving it too…

There are so many personal things in my life that I wouldn’t mind sharing with whomever takes the time to read this, but I’m not sure yet if I want to keep this a strictly “professional” blog.

Back To Mine

March 21, 2008

Automatic Display Lists

Filed under: Uncategorized — mbrazell @ 3:54 pm
Tags: , , ,

Replicators turned out to be a bust… so I decided to make display lists in the Scene Graph automatic. With automatic display lists, every existing and future demo can take advantage of the performance boosts from display lists with no changes to the XML. I’ve just completed the implementation, and am ready to unit test. Once all the kinks (if any!) are worked out, every static model in any scene will use display lists. I’m counting on a home run this time.

March 7, 2008

Waiting for a BIG compile to complete…

Filed under: Uncategorized — mbrazell @ 1:39 pm
Tags: , ,

I changed something in the basest of base classes, so I’m waiting for the whole project to compile… probably another 5 minutes.

I recently added display list support to the graphics engine of Bridgeworks (http://dev.bridgeborn.com/BwSchools). Currently, Bridgeworks supports OpenGL 1.1 and Direct3D 8.1. OpenGL already had display lists built in, so that was easy. I wrote my own version of display lists for the Direct3D component. The frame rate improvements were well beyond my expectations. I knew there would be some improvement, but I didn’t realize to what extent. On our test scene, which has many duplicated objects and can benefit from display lists, enabling the display lists brought the frame rate from 2 fps to around 33 fps… amazing. This will have positive implications for any scene that utilizes static or duplicated objects, like graphs for instance.

I want to further optimize the D3D display list support, by removing Get* methods from the display lists, as these are not necessary for rendering once the initial display list record has been made.

I’m currently working on what I call a “Replicator” node for the SceneGraph library. Tim, the CEO of Bridgeborn, and my personal friend who endlessly harasses me with his dry wit (I love it), said it sounded like something Arnold Schwarzenegger (had to look up that spelling) would say. The replicators purpose is to replicate prototypes of a model so that the model doesn’t have to be stored in the scene graph multiple times… another optimization that I’m hoping will prove beneficial. We’ll see.

Well the compilation has just finished, so I have too.

February 27, 2008

Hello world!

Filed under: Uncategorized — mbrazell @ 1:05 am
Tags: ,

The auto-generated title of this entry is appropriate for several reasons. First, I’ve just started a new, exciting chapter of my life in Virginia Beach, Virginia. Second, I’m a programmer, and “Hello world!” is typically the first program you write when learning a new programming language. Third, this is my first blog.

So, gleefully I proclaim… Hello world!

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.