Spellcaster Studios

Make it happen…

Category Archives: Development

OpenGL porting – Part 5

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 […]

OpenGL porting – Part 4

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 […]

OpenGL porting – Part 3

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… […]

OpenGL porting – Part 1

Well, nothing blog-worthy today, really… It was mostly just clearing the D3D code (or more precisely, putting it behind the #defines that shut it down), and replacing structures and enums (like primitive type) by more cross-platform ones… So, very boring, and very necessary… I’ll probably spend the next few days working on this OpenGL porting, […]

GLSL Optimizer

Today I integrated GLSL Optimizer to my shader code… It had some quirks: Doesn’t accept #line directives with name of the files, so I have to strip that when feeding it Doesn’t accept OpenGL 3.30 shaders   This last one isn’t that bad, although I was using 3.30 shaders (the tutorials I was using were […]

Preprocessor

Today I worked on building a preprocessor for GLSL… Well, I didn’t exactly built a preprocessor, GLSL has one (contrary to what I understood previously), but it doesn’t work like the Direct3D one. On the D3D one, when I ask him to compile a shader, I give him a series of preprocessor macros and he […]

HLSL2GLSL

My plan from the start was to use a converter to get my HLSL shaders to GLSL on the OpenGL version of Gateway… I was going to achieve this by using hlsl2glsl, but after fumbling around it for a bit, I don’t think I can use it without breaking much more stuff than it’s worth: […]

VBO and Alpha

Spent sometime today working with interleaved VBOs and indexed primitives in OpenGL… The way OpenGL seems to handle the VBOs is weird for me… For example, in D3D, I can say when I create a vertex buffer that I don’t care about the actual contents of the data I’m loading… That means I can write […]

Textures

OpenGL tests didn’t progress as much as I wanted, because I had to code a DDS loader for OpenGL (something that D3D provides with the D3DX library… OpenGLs way is better, in my opinion, that shouldn’t be part of the graphics API, but it saves time!). This is complex because DDS is a patchwork format […]

Transforms and colors

Doing some progress… There’s a fun part in this OpenGL nonsense… figuring out an API and getting stuff to work with it is like rediscovering 3d graphics and fast forwarding 10 years of learning! First of all, got transforms to work: First with glm, then I wanted to bring in my own matrix library, since […]