My graphics card died
It's looks like my graphics card didn't like my proposal about go back to coding so she just decided to crash :)
It started to happens while loading some GPU Gems demos, and at first I thought it was just some drivers issue, but I downgraded them and it didn't go out
So looking throw the web I just found a nice tool called ATI Tool, and yes, in despite of the name of the tool it works with Nvidia cards too.
After running the artifacts test on my 9800GTX+ for around 2 mins. I got the following results
Lucky me, because I didn't throw my old 6600, so I can still use my computer until I'll get it back from the RMA
Render passes
After coming back to my old code, arrange hundred versions of the same files, and being able to compile some of my past project I could finally started again coding some modifications to my old 64kb Introsystem.
One of the things that gaves me many headaches was the material manager. And of course it couldn't resist to come back to me :D.
During all this time a lot of things have changed related to the treatment of the materials, shaders, render passes and so on. So I decided to spend few days asking my dear friends and making draft on papers about how to manage that problem.
Having in mind that it will be used in 64kb intro I needed to have the feet on the ground and try to keep it simple
So here is it my first draft.

The main class is Scene were you store all the nodes. After loading the objects you just add the passes you need for each material on each group of objects using addPass
During rendering, you should call on each frame update to compute the transformation matrix for each node.
Right after compute the matrices you could call render function that will iterate throw all the passes for the scene:
void Scene::render() { setGlobalState(); setWorldTransformation(); for (iPass=0;iPass<passesList.Count;iPass++) passesList[iPass].render(); restoreWorldTransformation(); restoreGlobalState(); }
In the Pass::Render() function we should just activate the current render context (Usually just a camera, or a render to texture object), following by the call to apply the selected material:
void Pass::render() { renderContext->activate(); material->applyMaterial(objectList,sceneID); }
Finally the ApplyMaterial function do all the passes for each state and shader program to the selected objects passed by parameter (We're assuming a scene manager singleton):
void Material::applyMaterial(objectList[] objList, int sceneID) { for (int iPass=0;iPass<numPasses;iPass++) { loadPrograms(iPass); setStates(iPass); vprogram=getVProgram(iPass); pprogram=getPProgram(iPass); for (int iText=0;iText<numTextures;iText++) loadTextures(iPass,iText); vprogram->activate(); pprogram->activate(); // Get the scene from singleton and // render the selected objects SCENE_MANAGER.Get(sceneID)->renderSelected(objList); // Disable everything vprogram->deactivate(); pprogram->deactivate(); unloadTextures(); restoreStates(iPass); } }
Note also that in the last code you could use something like setCurrentPass(iPass) on each iteration instead of call all the methods with this parameter. I just left it like that to make it clear that those functions are dependents on the pass
That's all for today. I'll try to implement it during next days. I'll let you know how is going :) (Give me luck)
Hello world, once again :)
Well I just opened a Visual Studio project and start to drop few lines...
Maybe It's just that I've felt bad all this time because I started so many projects, so many tools, and they just got stuck somewhere.
But right now I just got a little power and I'll try to get something back from all of them.
I hope it will push back someone else once again at least for one more time, since we had many things to say that remain unsaid :P.
Yes... I know it's not very good time for scene, and we're getting older, but it still could be funny :)
PS: Anyway... you know... it will go slow :P