Mikko Rasa [Wed, 22 Aug 2012 13:17:34 +0000 (16:17 +0300)]
Remove the specialized setters from UniformBlock
They were not very useful and were also getting in the way of uniform
buffer support. UniformBlock also no longer clones the uniforms for
itself, reducing overhead.
Mikko Rasa [Wed, 22 Aug 2012 12:28:40 +0000 (15:28 +0300)]
Make RenderPass shprog and shdata settable from code
For consistency with other similar interfaces, the pointers are now
const. As a consequence, a uniforms statement in a datafile overrides
any previous uniforms.
Mikko Rasa [Mon, 20 Aug 2012 13:13:46 +0000 (16:13 +0300)]
Simplify Pipeline pass management
Originally I planned to use Pipelines to bundle objects with effects like
environmentally mapped reflection. However, that task was delegated to
effects themselves recently, so there's no longer need for passthrough
rendering in Pipeline. The render_all function was also a nuisance, as
it required Pipelines to be treated differently from other Renderables.
Passes are now stored in a list instead of a map. This allows multiple
passes with the same tag (think multipass lighting), and avoids the need
to store the pass order separately.
Mikko Rasa [Mon, 20 Aug 2012 12:39:26 +0000 (15:39 +0300)]
Move PipelinePass inside Pipeline and make the data members private
It's really simple and specific to Pipeline, so it doesn't make much
sense to have it as a separate class. Encapsulation is necessary for
some future plans, and also more consistent with other public interfaces.
Mikko Rasa [Sun, 19 Aug 2012 23:46:45 +0000 (02:46 +0300)]
Use the hash function from mspcore
Constructing tags mostly happens when loading datafiles or otherwise
outside the rendering loop, so the small extra overhead from a
cross-library function call is not significant. Renderables that wish to
compare the Tag against a fixed value should avoid constructing the
reference Tag on every render call anyway.
Mikko Rasa [Thu, 16 Aug 2012 16:46:12 +0000 (19:46 +0300)]
Turn Effect into a Renderable
They were really intended to be used this way. This also makes it much
easier to apply an Effect to only a part of a scene. Previously it would
have been necessary to wrap the Effect in a Pipeline, which doesn't
really support passthrough.
Mikko Rasa [Wed, 15 Aug 2012 19:36:33 +0000 (22:36 +0300)]
Restructure ProgramData to support sharing between Programs
This removes a major annoyance when dealing with ObjectInstances and
shaders. It also paves way for Effects being able to provide uniforms,
and support for GL_ARB_uniform_buffer_object.
Mikko Rasa [Wed, 15 Aug 2012 19:18:09 +0000 (22:18 +0300)]
For a few lingering whitespace issues
The scripts had been ignored entirely in the previous conversion. As a
result, a few newly generated extensions didn't have proper whitespace.
Pure virtual functions in headers had also slipped through.
Mikko Rasa [Mon, 13 Aug 2012 17:47:53 +0000 (20:47 +0300)]
Lookup functions to determine the orientation of cube map faces
The orientations are somewhat arbitary and not deducible with a simple
algorithm. Writing the necessary conditional ladders everywhere would
be annoying.
Mikko Rasa [Sat, 11 Aug 2012 13:38:35 +0000 (16:38 +0300)]
Don't link program with the transform feature in constructor
The transform feature produces calls to external functions, which need to
be added in a separate shader. Trying to link in the constructor only
produces link errors.
Mikko Rasa [Sat, 11 Aug 2012 13:36:30 +0000 (16:36 +0300)]
Better way to deal with program-owned shaders
Track which shaders exactly are owned by the program rather than having
just a single flag. This prevents double-free problems if a program
contains both owned and non-owned shaders, as might be the case with the
transform feature.