OpenGL on OS X

Lör 16 Maj 2009
I've been doing some past time OpenGL programming on my MacBook. The nVidia 9400M it's equipped with has maybe not best performance but a fair number of capabilities. One of the biggest problems I've encountered was an subtle but critical behavior in the OS X OpenGL implementation. On OS X the OpenGL stack is not initialized correctly before the application window has been created, causing all calls to OpenGL functions cause EXC_BAD_ACCESS exception. I found the solution on this excellent forum! Other than that everything has worked as expected. As I'm used to DirectX from my work it takes a bit of rethinking. At least I have shader system in place. Importing meshes and textures is another story though. Category: programming opengl mac

Röyksopp video

Tor 26 Februari 2009
Awesome new video for Röyksopps Happy up here, the first single from the new album Junior, featuring some space invader like billboards. Great song, great video! Also added my favorite Röyksopp song What else is there featuring the haunting vocals by Karin Dreijer from The Knife! Check out Röyksopps Vimeo page for more videos. Don't miss Remind me with the encyclopedia graphics. Category: music video art

Blueprint

Sön 22 Februari 2009
I'll have to write something about Blueprint. It's a CSS framework which gives you a complete grid layout for free. I'm using it for a site I'm working on right now and it's looking great. The usefulness of such a framework is pretty obvious, but I'll tell you why it's a big deal anyway. You don't have to invent the wheel again, thus saving a lot of development time. It's flexible, so if you decide to change the layout in a later stage your whole design doesn't fall apart. Finally, and in my opinion the most important point, it's tested. It supports most browsers (even IE 5 with some special markup). Also it's one of the more tricky parts of web development. If that is not a time saver, I don't know what is... Category: web css webdesign resource

Emacs

Tor 29 Januari 2009
I've started using Emacs again. I first got into Emacs at Digital Domain where it was the tool of choice for many of the coders. After I left though I've become complacent (and stuck) and settled with other editors. At work there is of course Visual Studio, which is fine and a complete IDE. However, yesterday I downloaded Emacs for Windows after I stumbled over a video explaining org-mode and thought it would be good thing to use both for keeping notes at work, and for other projects that I keep on the side. I had to dig out the old .emacs files I got from Nafees at Digital Domain and customized them a bit. I also found some cool tricks specifically for drupal: ;; Drupal specific files php files(add-to-list 'auto-mode-alist '("\\.module$" . php-mode))(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode))(add-to-list 'auto-mode-alist '("\\.install$" . php-mode))(add-to-list 'auto-mode-alist '("\\.engine$" . php-mode))(add-to-list 'auto-mode-alist '("\\.theme$" . php-mode)) One of the most annoying operations in Emacs IMHO is switching between buffers. Using c-x b and typing can be useful if you have several buffers open, but most times I have only a few open at the same time. Therefore these shortcuts help me quickly switch between buffers: (define-key global-map [f1] 'next-buffer)(define-key global-map [f2] 'previous-buffer) also, if you are windows damaged like me, undo and searching functions are ingrained as: (define-key global-map "\C-z" 'undo)(define-key global-map [f3] 'isearch-forward) Emacs can also help with automatic indentation of code. Since there are no set standards for indentation and formatting of code, and source of great debate, there are ways to manipulate that: ;; Indentation;;==========================================================;; IDE tab and indentation settings.;; http://cc-mode.sourceforge.net/html-manual/Syntactic-Symbols.html;; The settings are basically stroustrup mode, but a few differences(setq indent-tabs-mode nil)(setq tab-width 4)(setq c-basic-offset tab-width)(c-set-offset 'statement-block-intro '+)(c-set-offset 'defun-block-intro '+)(c-set-offset 'substatement '+)(c-set-offset 'substatement-open 'c-indent-one-line-block)(c-set-offset 'brace-list-open 2) ;; enum \n { ...(c-set-offset 'innamespace 2) ;; namespace ... {(c-set-offset 'access-label -2) ;; public/private/protected(c-set-offset 'case-label +2) ;; switch (...) { label:(c-set-offset 'statement-case-open 0)(c-set-offset 'statement-cont 'c-lineup-math)(c-set-offset 'inline-open +2)(c-set-offset 'arglist-intro '+) ;; statement( \n arg1, \n arg2, ... (c-set-offset 'arglist-close 0) ;; ) Since PHP-mode is based on c-mode it will adhere to the same settings. Finally I would just like to share the color scheme that I stole from Nafees. It also serves as an example on how to write a LISP function and execute it: ;; Colors;;==========================================================(defun color-theme-johan () (set-background-color "gray15") (set-foreground-color "gray85") (set-cursor-color "violet" ) (autoload 'faces "faces" t ) (set-face-foreground 'bold "red" ) (set-face-foreground 'bold-italic "blue" ) (set-face-foreground 'italic "deeppink2" ) (set-face-background 'highlight "thistle3") (set-face-foreground 'underline "darkorange4" ) (set-face-foreground 'modeline "black") (set-face-background 'modeline "Orange") (set-face-foreground 'region "red3") ;; marked text (set-face-background 'region "antiquewhite1") (set-face-foreground 'secondary-selection "yellow4") (custom-set-faces '(org-level-1 ((t (:foreground "DarkOrange" :background "Black")))) '(org-level-2 ((t (:background "Black")))) ));; Apply colors(color-theme-johan) Attachment Size My Emacs settings file 4.31 KB Category: emacs software tips drupal

Franklyn trailer

Tor 15 Januari 2009
Trailer for the upcoming movie Franklyn, with Eva Green and Sam Riley who played Ian Curtis in the Joy Division film Control. Also it's a British film, and the limeys haven't let me down in quite a while. V for Vendetta, Children of men and Shaun of the Dead to name a few of the good movies coming out of the islands in recent years. Category: film trailer

Northern Öland

Tis 23 December 2008
I'm spending Christmas with my dad, Carina and my sister Anna in Öland. Carina has a Berner Sennen kennel and we took their three dogs, a loaner and my sisters dog, the tiny but insanely intense Ifriit, out for a trip to Trollskogen on the very northern tip of Öland. After a one and a half hour drive we got to the place and it was freezing cold and windy. Despite the conditions some crazy surfer defied the weather and was surfing some of the biggest waves I've seen in Sweden. Good thing he had his gas heated Volkswagen bus with him. Dad has a new Olympus E-510 digital SLR which is really nice and I got some good ones. I also got a chance to use their extra flash for the portrait shot. Worked out quite nice I think. Too bad it was soo cold I couldn't (or wouldn't because I was freezing my fingers off) do some more experimenting with manual modes. Tomorrow it's Christmas eve and I'm going to see grandma in Blekinge. Merry Christmas everyone! Category: vacation öland dogs

Sub-prime tour 08

Mån 15 December 2008
I recently came back from a 2 week long well deserved vacation in the east coast of USA. The trip started with four days in New York were we stayed at the Roosevelt Hotel near Time Square and Union Station. NY was really really cold, but we still managed to see most of lower Manhattan as well as large parts of Brooklyn, although we completely missed the fabled trendy parts and only found different ethnic parts in various states of decay. Still we had a really good time, good food and visited some awesome places! Hit the jump for more pictures and text. Next we rented a car, it turned out to be a white Chevy Equinox, and started the roadtrip stage of the vacation. The goal was to get from New York to Miami in four days. We spent one day in Washington which meant we had to drive 1000 km per day the other three days. We stayed at motels in Alexandria outside of Washington, Norfolk and Charleston. Washington was impressive. We only saw the parts of town around The Mall, but that took the better parts of a day. There was lot's of activity, apparently building stands and facilities for Barack Obamas inauguration in January. Next time I'm not going to miss Georgetown. It looked really cool. In Charleston we eventually managed to find our friends Nathan and Cali's house. They took us out on for a great, but unseasonably cold, evening on the town. Too bad we didn't get to see more of Charleston. It seems like a really nice place. When we finally got to Miami we had one night in town before the cruise stage started. After returning the car we boarded Majesty of the Seas for a 4 night cruise that took us to Nassau, Cocoa Bay, Key West and then back to Miami. I've never been on a cruise before, and it was special, I'll give it that. Like going on charter, but with better standards. I think a scene that describes the experience, and one that will stay in my mind, was when we decided to eat lunch at Jonny Rockets Hamburger bar, one of the restaurants on board. In the middle of the meal the Indian and Latin-american waiters suddenly break out in a synchronized dancing routine. Family friendly. Nassau was kinda cool, but I wonder what the rest of the town looked like. We only had time to visit the touristy part. Cocoa Bay was like a dream. Look at the pictures if you don't believe me. Key West was the best stop though. A really nice and small community on the tip of Florida. The last night of the vacation we decided to go out with a bang! When we got back to Miami we checked in at Ritz-Carlton right on South Beach. It was without a doubt the best hotel I've ever stayed at. Every detail was gorgeous, service was of course excellent and the only problem …

Norwegian black metal

Fre 05 December 2008
This is a kinda creepy video on Norwegian black metal from Vice magazine, in particular Gorgoroth and the lead singer Gaahl. I'm not at all into the genre but it is cool production on an interesting subject. After recently finishing Hunter S Tompson's book on Hells Angels, I think I see definitive similarities. Same nonconformist message and the same Nietzschean belief in the in the individual. Though one big difference is that (at least the early) Angels were quite social while Gaahl seems to be the definition of a recluse. Then there is also the fact that Angels are about brotherhood, while Gorgoroth seems to be about the individual. Towards the end of the video though one thing comes to mind, which also many commenters pointed out. What kind of producer goes to the northern parts of Norway with no coat and a pair sneakers? Anyway, an interesting and atmospheric way to spend 30 minutes. Category: Info

Mirror's Edge Launch Trailer

Fre 07 November 2008
Today the launch trailer for Mirror's Edge was released. Everyone is awaiting next week when the first reviews should show up. It's been a long time since we started work with this project and now it's nearing the end. Launch date is 12th of November in the US (14th in Europe). Tried to embed the trailer but the Gametrailers player doesn't want to cooperate... Category: Mirrors Edge

The New Yorker on gaming

Tis 28 Oktober 2008
Here's a great article on the gaming industry in general and Epic Games and Cliff "CliffyB" Bleszinski in particular. Even though I don't like the Gears of War games the article offers a rare perspective on the industry from the view of an outsider but without the usual patronizing stereotypes of gaming. “You tell people what you do for a living,” Bleszinski said later, “and they’re like, ‘Oh, you play video games for a living.’ No, I play a game that’s not as fun as it should be, that’s broken, until it’s no longer broken. Then I give it to other people to have fun with.” A lot of media has reported on the incredible growth of the industry over the last years, but most view it with the same simplistic and newly awaken amazement. I think the this article captures the creativity, professionalism and sheer effort that goes in to make a modern high quality game, while keeping objectivity and critically observe. Category: News