Tuesday, March 12, 2013

almost donee

just need to implement the collision object and frustum and I am done. If I'm not lazy, I will implement the spline path and triangle strip. I can imagine how spline path will look like. But for triangle strip, I thing I am lazy to make such an object to test it. I don't know if I have to arrange the triangle to make triangle strip pattern or from the object created by artist and slam it into triangle strip

Friday, March 8, 2013

dirty programming

My hand is very dirty now. I bruted force everything as long as the code works. I created non relevant method anywhere. I don't know if cleaning up will be frustrating.

For this assignment, I have to create and structure scene graph from scratch. The data structure for the scene graph is using PCSTree. The application will run a Scene. When the program is loading, I called SceneLoad(). SceneLoad() will construct the game objects into tree.

The first thing is the root. Right now, I created an object root special for root. Each time the program loads, I have to attach nodeRoot into the tree manually. Then I can attach the rest of the objects.

I made graphics object class inherit from PCSNode. It can be attached and attaching with another graphics object. It also has speciality. The model matrix of the child always inherit from the parent. So whenever the child matrix has transformation, it will follow the parent's transformation then run the child's transformation.

The same thing with shader. The texture will act as a shader. So if the child doesn't have any shader, then it will use parent's shader. If both do not have shader, then both will use default shader.

The other problem is the stock shader from GLTools. The method UseStockShader from GLTools seems like the root of everything to render. If I want to use different shader, I need to use the stock shader and pass appropriate parameter. The stockshader is using GLSL shader because its structure has vertex shader and fragment shader.