Skip to main content

Posts

Showing posts from May, 2010

Yet Another Discovery (OpenGL2.0)

Adrian has been receiving a face lift with fancy glsl opengl stuff. Now I've seen good number of problems with using the GLSL shaders. But what i found today was a little more annoying. So today i thought i'd update the display drivers to a latest version because its' been a while and it's always good to have the latest ones... because all the other users might be using them. Now Adrian which was working fine starting showing a colored screen instead of the actual game, I was shocked because i haven't changed anything but a working code stopped working now. Apparently iv'e assumed something that i shouldn't have.. see.. the vertex shader that we use has a line which goes something like this: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; This looks fine.. if we dont' set the texture matrix, it should ideally be and identity matrix .. or so i thought. Any way... Now .. after digging through all the code.. making modifications everywhere i coul

OpenGL2.0

I know OpenGL2.0 has been out for a while now and i have been developing small example programs for learning purpose, But I've been putting off developing using OpenGL2.0 (GLSL) etc because I wasn't sure if people would be able to play them because of hardware issues. I wanted to develop a game which used OpenGL2.0 features. I wanted to try it out for Last PyWeek but most of the people participating did not have compatible graphics hardware so i scraped that idea. But after having looked at a couple of game engine related blog posts at http://blog.wolfire.com/ , I decided i have to write a game with Graphics Engine using GLSL shaders. So Instead of writing from scratch, I thought it would be best if I tried out on an already developed game and "Adrian" was the obvious choice. We have been updating the game since last year during our free time (yes.... this isn't a solo effort... ) and so updating graphics engine came up. I wanted to start small and

Minute Mistakes Franatic Frustration

I've been working on updating our good old game " Adrian ". Trying to update the graphics engine to use shaders, frame buffers and all that stuff. Actually the other day i found a wonderful game dev blog which discussed various graphics engine tweaks, implementations etc. I've been eager to work on something with shaders.. thought Adrian might be the best bet. So i quickly started writing some basic code for handling multiple pass rendering and some basic code for handling frame buffer objects etc. I've read a lot about glsl .. even done some examples (simple ones) before so i did not think it would hard to get stuff running.. boy was i wrong.. I struggled to get multiple textures to work in my shaders.. and the reason?.. well let me put it in code... //vertex shader void main() { gl_Position = ftransform(); gl_TexCoord[0] = gl_MultiTexcoord0; } //fragment shader uniform sampler2D tex0; uniform sampler2D tex1; void main() { gl_FragColor = texture2D