T2D GFX: Gone a bit off the rails..
by Paul Jan · 06/18/2013 (7:34 pm) · 3 comments
Layering
I've converted layering from a fixed array of 32 to a vector of SimSet subclasses (Layer). This will allow for an unlimited number of layers, but more importantly, set things up for more Layer based rendering operations, such as camera tricks, and layer-based filter operations. Along the way I removed collision-by-layer, which I feel complicates collision. I would really like to be able to render something like Gravity Ghost (kotaku.com/a-fresh-look-at-gravity-ghost-the-little-indie-mario-g-514116801&...) without a lot of work.
GLFW
After one night of trying to get a windows build running, I'm converting the windows management system to one based off of GLFW (www.glfw.org), a cross platform OpenGL rendering window system. I've got OSX currently converted over, and hopefully windows should go more smoothly.
One thing that resulted from this is that I've had to take another look at how Canvas and windows work together and I think I now have a setup that allows for multiple canvases/windows. I still need to test it after I get a single window on win32 working.
No screenshots for now since it doesn't look much different from my last blog - I plan to fix that.
I've converted layering from a fixed array of 32 to a vector of SimSet subclasses (Layer). This will allow for an unlimited number of layers, but more importantly, set things up for more Layer based rendering operations, such as camera tricks, and layer-based filter operations. Along the way I removed collision-by-layer, which I feel complicates collision. I would really like to be able to render something like Gravity Ghost (kotaku.com/a-fresh-look-at-gravity-ghost-the-little-indie-mario-g-514116801&...) without a lot of work.
GLFW
After one night of trying to get a windows build running, I'm converting the windows management system to one based off of GLFW (www.glfw.org), a cross platform OpenGL rendering window system. I've got OSX currently converted over, and hopefully windows should go more smoothly.
One thing that resulted from this is that I've had to take another look at how Canvas and windows work together and I think I now have a setup that allows for multiple canvases/windows. I still need to test it after I get a single window on win32 working.
No screenshots for now since it doesn't look much different from my last blog - I plan to fix that.
About the author
#2
The reason for the software approach is most GPU shaders only take into account the nearest 2 or 3 light sources. That works for meshes that are small compared to the area covered by a light, but for a big background lit by 10 or so small light sources, this is unsatisfactory. Since batch rendering bundles all the sprites into one big mesh, this is a problem even if you are using some form of tile setup instead of big backgrounds.
I get the feeling I'm going to need to write up my own shader for this.
06/19/2013 (1:21 am)
One thing I've found is the my current approach to lighting is very cpu intensive. Desktop computers pretty much laugh at anything T2D demands, but my iPhone4S is starting to feel the strain. The reason for the software approach is most GPU shaders only take into account the nearest 2 or 3 light sources. That works for meshes that are small compared to the area covered by a light, but for a big background lit by 10 or so small light sources, this is unsatisfactory. Since batch rendering bundles all the sprites into one big mesh, this is a problem even if you are using some form of tile setup instead of big backgrounds.
I get the feeling I'm going to need to write up my own shader for this.
#3
06/23/2013 (1:09 pm)
Windows now runs... kinda. Framerate drops like a rock and inputs don't seem to be working. 
J0linar
that just sounds exciting
and might even be a (later) bridge for t3d
anyways lookin forward to your windows version