
Well, today’s the first day since I started the whole “game dev every day” thing that I didn’t do any game development! That’s over 0.5 year of 2 hour a day minimum development time!
This is an extremely old Christmas postcard we did at Spellcaster Studios (back when we launched Shadow Stars, back in 2004 or so).
So, best wishes from everyone here at Spellcaster Studios to everyone out there!
Finally, got the first decent screenshot for the OpenGL renderer:

The biggest problems was I was using glBindAttribLocation in the wrong place, after the shader linkage was done… No error was returned, but the bind wasn’t being made… I just don’t know how the UVs were being displayed properly…
The 3d part is still a mess and it doesn’t work properly:

I can recognize a lot of stuff, but some other is just a huge mess. I’m already seeing problems with dynamic texture creation (the map display), some issue with the font rendering (probably the same thing, since I recognize the characters, but the colors are wrong), and I have no idea what that zebra stuff is, culling is wrong as well…
So time to jump into the debugger again!
Now listening to “The Flame Within” by “Stream of Passion”
Link of the Day: Ever since I saw the tech docs for Umbra I thought the GPU would be great to do occlusion culling, but I didn’t know we could do it now… Here’s a great sample/shader/presentation: https://github.com/nvpro-samples/gl_occlusion_culling
I’m kind of stuck on my OpenGL porting… The code is all in, I’ve already fixed a lot of stuff, but still I get no results!

This was supposed to be the main menu, but no textures are being loaded, basically… I also know I have issues with the vertex colors, but the main problem now is the textures…
The texture coordinates are correct (if I display that instead of the sampled color, it looks correct), so there’s something at the texture bind level…
Currently I’m using gDEBugger to analyze the OpenGL calls… It’s a good tool, but it’s not as good as Pix for what I want (might be better for other stuff, like performance analyzing)…
Oh well, back to the debugger!
Now listening to “Indestructable” by “Disturbed”
Link of the Day: King’s Quest was one of the first games I played on my Amiga, and I still have a soft spot for it (and classical graphical adventures). News of this remake has got me happy, and I like what they’ve done with it so far:
Well, I promised no more screenshots of just my development environment… Sorry…

This is the first run of the OpenGL port… All code is in, but (obviously enough) it’s not working properly…
If I had Pix, I could just go in and see what variable is badly set, or what’s the state of the vertex buffers, etc…
Apparently, the only thing that’s working is the “clear screen” thing, but the thing with 3d graphics is that you go from this to working condition with just a couple of changes…
Now I need to go find a OpenGL debugger or something similar… No idea if such a thing exists or not, but I recall seeing something about one of those some time ago, need to search for the link…
Anyway, it feels good just to have the whole code, and I’m pretty sure 90% of it is actually correct (the shader part, mainly)… This is probably a Z-Buffer issue (the reversed Z thing, maybe?), or a “vertex load” issue…
Now listening to “Under the Same Sky” by “Sleeping Pulse”
Now playing “The Last Door”… A great indie pixel-art Lovecraftian graphical adventure… It’s a good example that the best terror is the one inside. You don’t nee fancy graphics to scare the player (and I think they actually would detract from the experience, imagination is a powerful thing!)
Link of the Day: This is another of those games that I don’t see myself playing (I like more “driven” games), but this last trailer for “No Man’s Sky” is impressive. It uses some of the techniques I’ve been using for “Gateway”, but they do it right! 
Almost, but not quite there…
Basically, only one thing remaining: finding out what are the vertex/pixel constants required for the shader in question…
I should be able to iterate them with glGetProgramiv(program_id,GL_ACTIVE_UNIFORMS…), but this always returns 1, which can’t be…
After I solve this one, I’m golden!
Then it’s debug time to know why the great code I have is not doing anything!
No screenshot today, I’m sick of Visual Studios shots! 
Now listening to “The Mystery of Time” by “Avantasia”
I swear I’m almost done with the development environment screenshots!

Today I did a lot of progress on the OpenGL porting, hopefully tomorrow I’ll be able to finally display something on the screen beyond the yellow screen I have currently!
There’s a lot of stuff that OpenGL works differently from DirectX (most of it is because of DirectX’s fixed function pipeline compatibility, that I was using until a few months ago), so I have to reverse the way some stuff works… Textures used to be something rather fixed on Cantrip (not on Spellbook, though), so a specific texture name (“map0”, for example) was going to be bound to sampler 0. On OpenGL, there is no independence of “vertex/pixel constants” and “samplers”, so I have to ask the shader where does he want me to place stuff for it.
It’s a simple change, but it makes me have to reverse the way I build certain stuff…
Now listening to “The Skrillex Remixes”
Link of the Day: I’ve been following the development of this one for some time now, and although the game doesn’t seem to be my kind of thing, it has terrific ambiance… Here’s the new trailer for it:
Christmas season, so not much time to work on the game (not even browsing the net, if you’ve noticed the lack of link of the day)!
So…. New texture class (to abstract the OpenGL texture, which is a bit more important than in the case of DirectX). The code became prettier…

That is all…
Now listening to “Nightfall in Middle-Earth” by “Blind Guardian”
Today I really got into the OpenGL porting… It will take a while, but it’s going nicely…
Nothing to show for it (3d graphics usually require a lot of different stuff in place before they can actually produce results), although it will be a case of “nothing to show” to “everything to show”…
3d rendering is based on few primitives:
-
Vertex buffers
-
Index buffers
-
Textures
-
Vertex Programs
-
Pixel Shaders
That’s mainly it… After you implement those, you can do most stuff!

Yep, I know, screenshots lately have been terrible! 
Now listening to “Design Your Universe” by “Epica”
Today was a wasted day… :\
Decided to see if my changes screwed up the D3D renderer, and boy did they!
This is what I had waiting for me, instead of the main menu:

Booted up Pix, and found out that I had a the declaration of the alpha test reversed, so no big deal… Menu was back and going into the game, I had this waiting:

It seemed the Z-buffer wasn’t working, but all the sets were there, and Pix wasn’t reporting anything wrong…
After a lot of scrounging around, I finally figured out… I have a function to set renderstates (so that it checks for redundant sets, etc), but in the function that set the z-state, instead of using that function, I was using directly the device function… That wouldn’t be a problem, if I didn’t read from another variable… Which meant the setting I was placing wasn’t being acknowledged by the system, which meant that basically setting the state to true wasn’t working, but setting it to false was…
So, I got this working:

But, when working on the last issue, I noticed that Pix was still just showing the yellow screen… Everything seems to be correct, the output color of the shaders for specific functions was set correctly, etc, but no display…
After loads more time (also due to the fact that I used the wrong DirectX control panel to turn on debug mode), I figured out I had a define with the wrong name (_USE_D3D9 instead of USE_D3D9), which meant index buffers weren’t being unlocked, which led to the weird behavior on Pix (although it didn’t cause problems running the game stand-alone).
So, today was pretty much a waste… 
Now listening to “Somewhere in Time” by “Iron Maiden”
Finally finished the “compile” part of the work…
The system now compiles in a OpenGL executable, and the amazing results is:

Which is to be expected, since I didn’t actually place any OpenGL code in it anymore, just breakpoints for when the code reaches that position… 
So, coding time!
Now listening to “The Sinister Urge” by “Rob Zombie”