Spellcaster Studios

Make it happen…

Tag Archives: opengl

OpenGL Porting – Part 9

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

OpenGL Porting – Part 8

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

OpenGL Porting – Part 7

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

OpenGL porting – Part 6

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

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