]> git.tdb.fi Git - libs/gl.git/log
libs/gl.git
12 years agoUse CLAMP_TO_EDGE on postprocessing textures
Mikko Rasa [Fri, 14 Sep 2012 21:55:32 +0000 (00:55 +0300)]
Use CLAMP_TO_EDGE on postprocessing textures

12 years agoRemove useless GL:: qualifiers
Mikko Rasa [Fri, 14 Sep 2012 21:54:48 +0000 (00:54 +0300)]
Remove useless GL:: qualifiers

AmbientOcclusion was initially developed outside the mspgl tree, and these
were not removed when it was brought in.

12 years agoFix type errors in ColorCurve fragment shader
Mikko Rasa [Thu, 13 Sep 2012 08:36:07 +0000 (11:36 +0300)]
Fix type errors in ColorCurve fragment shader

12 years agoVersion bump; compatibility was lost weeks ago
Mikko Rasa [Wed, 12 Sep 2012 19:12:54 +0000 (22:12 +0300)]
Version bump; compatibility was lost weeks ago

12 years agoA complex demo program to show off features of the engine
Mikko Rasa [Wed, 12 Sep 2012 18:58:34 +0000 (21:58 +0300)]
A complex demo program to show off features of the engine

12 years agoPlug a memory leak
Mikko Rasa [Wed, 12 Sep 2012 18:04:59 +0000 (21:04 +0300)]
Plug a memory leak

12 years agoDon't unbind the fbo until the entire cube map has been rendered
Mikko Rasa [Wed, 12 Sep 2012 17:05:06 +0000 (20:05 +0300)]
Don't unbind the fbo until the entire cube map has been rendered

12 years agoSupport for anisotropic texture filtering
Mikko Rasa [Wed, 12 Sep 2012 07:35:46 +0000 (10:35 +0300)]
Support for anisotropic texture filtering

12 years agoMake it possible to customize texture sampling in standard shaders
Mikko Rasa [Tue, 11 Sep 2012 20:55:25 +0000 (23:55 +0300)]
Make it possible to customize texture sampling in standard shaders

12 years agoDeactivate all arrays when deleting the active VertexArray
Mikko Rasa [Tue, 11 Sep 2012 20:52:13 +0000 (23:52 +0300)]
Deactivate all arrays when deleting the active VertexArray

12 years agoSet all color attachments of a Framebuffer as draw buffers
Mikko Rasa [Tue, 11 Sep 2012 20:29:22 +0000 (23:29 +0300)]
Set all color attachments of a Framebuffer as draw buffers

Indexing gl_FragData selects from the active draw buffers, so this is
required for multiple fragment shader outputs.

12 years agoAdd an EnvironmentMap effect
Mikko Rasa [Mon, 10 Sep 2012 21:35:23 +0000 (00:35 +0300)]
Add an EnvironmentMap effect

12 years agoDon't assume a directional light's position vector to be unit length
Mikko Rasa [Sun, 9 Sep 2012 21:46:22 +0000 (00:46 +0300)]
Don't assume a directional light's position vector to be unit length

12 years agoBring back reflection mapping support to standard shaders
Mikko Rasa [Sun, 9 Sep 2012 21:02:36 +0000 (00:02 +0300)]
Bring back reflection mapping support to standard shaders

12 years agoFix a stupid copy&paste mistake
Mikko Rasa [Sun, 9 Sep 2012 21:00:45 +0000 (00:00 +0300)]
Fix a stupid copy&paste mistake

12 years agoCompatibility fixes
Mikko Rasa [Sat, 8 Sep 2012 15:53:51 +0000 (18:53 +0300)]
Compatibility fixes

Fix a template parameter deduction on 64-bit system

Fix a shader type mismatch

12 years agoUse the frame notifications in ShadowMap
Mikko Rasa [Sat, 8 Sep 2012 15:37:46 +0000 (18:37 +0300)]
Use the frame notifications in ShadowMap

12 years agoNotify Renderables about the start and end of a frame
Mikko Rasa [Sat, 8 Sep 2012 14:16:55 +0000 (17:16 +0300)]
Notify Renderables about the start and end of a frame

This makes it possible for Renderables to do certain things only once per
frame.  This is particularly useful for Effects which need expensive
preparation.

12 years agoFix vertex array offsets
Mikko Rasa [Mon, 3 Sep 2012 19:06:25 +0000 (22:06 +0300)]
Fix vertex array offsets

Since array application order may now be different from the format order,
and VertexArrayBuilder stores components in the latter, calculating the
offsets while applying arrays gives wrong results.

12 years agoAdd a method of getting the model matrix of a Renderable
Mikko Rasa [Mon, 3 Sep 2012 15:58:31 +0000 (18:58 +0300)]
Add a method of getting the model matrix of a Renderable

This can be used for various position-dependent rendering techniques, such
as certain effects and frustum culling.

12 years agoInclude local headers with "", not <>
Mikko Rasa [Mon, 3 Sep 2012 10:24:45 +0000 (13:24 +0300)]
Include local headers with "", not <>

12 years agoRename the matrix reference version of uniform_matrix4 to uniform
Mikko Rasa [Mon, 3 Sep 2012 10:19:13 +0000 (13:19 +0300)]
Rename the matrix reference version of uniform_matrix4 to uniform

This is more in line with the other uniform setters, which don't have any
type suffix when given an argument from which the type is apparent.

12 years agoAdd 3x3 and 2x2 uniform matrices
Mikko Rasa [Mon, 3 Sep 2012 10:18:30 +0000 (13:18 +0300)]
Add 3x3 and 2x2 uniform matrices

12 years agoRenderer no longer needs to track vertex array changes
Mikko Rasa [Mon, 3 Sep 2012 09:14:49 +0000 (12:14 +0300)]
Renderer no longer needs to track vertex array changes

12 years agoRework vertex array application
Mikko Rasa [Mon, 3 Sep 2012 09:04:21 +0000 (12:04 +0300)]
Rework vertex array application

VertexArray now tracks the currently applied array, and works out the
necessary changes as the difference from the previous one.

12 years agoStandard vertex components for tangent and binormal vectors
Mikko Rasa [Sun, 2 Sep 2012 18:11:56 +0000 (21:11 +0300)]
Standard vertex components for tangent and binormal vectors

This simplifies using normalmapped standard shaders, as the shader is
ready to use without the need to declare tangent and binormal attribute
indices.

12 years agoRearrange exporter controls and add the omitted export_uv property
Mikko Rasa [Sun, 2 Sep 2012 17:18:14 +0000 (20:18 +0300)]
Rearrange exporter controls and add the omitted export_uv property

12 years agoLoad VertexFormat for Mesh as an array of VertexComponents
Mikko Rasa [Sun, 2 Sep 2012 17:14:20 +0000 (20:14 +0300)]
Load VertexFormat for Mesh as an array of VertexComponents

The single-token approach made indexed attributes rather ugly.  Loading
each component separately also gives better diagnostics in case of
erroneous tokens.

12 years agoRearrange vertex components
Mikko Rasa [Sun, 2 Sep 2012 14:50:48 +0000 (17:50 +0300)]
Rearrange vertex components

The first 16 component types are now reserved for the library.  This
leaves room for adding standard generic attributes, such as TBN vectors.
To make further room, texcoords were limited to four indices.

Generic attributes are limited to 24.  Current implementations seem to
only support 16 (the minimum allowed by the spec), so this is not a huge
problem.  There's also exactly enough room for another set of 24 generic
integer attributes.

12 years agoAdd a helper function for making indexed vertex components
Mikko Rasa [Sun, 2 Sep 2012 14:32:19 +0000 (17:32 +0300)]
Add a helper function for making indexed vertex components

This puts the logic for checking the allowable index ranges in one place.

The base for an indexed component must now be one with a zero index.  It
didn't make much sense to add an index to an already indexed component.

VertexFormat::offset no longer takes an index, since the helper function
can be used.

12 years agoMemory allocation changes
Mikko Rasa [Sun, 2 Sep 2012 14:30:54 +0000 (17:30 +0300)]
Memory allocation changes

Use std::copy instead of memcpy
Call operator= from copy constructor
Allocate memory only when needed, not one byte before

12 years agoTurn VertexFormat into a class and hide the data member
Mikko Rasa [Sun, 2 Sep 2012 14:29:02 +0000 (17:29 +0300)]
Turn VertexFormat into a class and hide the data member

Outsiders have no need to access it directly

12 years agoHelper functions for extracting vertex component type and size
Mikko Rasa [Sun, 2 Sep 2012 09:16:12 +0000 (12:16 +0300)]
Helper functions for extracting vertex component type and size

Magic numbers are bad.  This makes the code more robust against future
changes.

12 years agoShuffle the members of VertexArray into a sensible order
Mikko Rasa [Thu, 30 Aug 2012 21:45:21 +0000 (00:45 +0300)]
Shuffle the members of VertexArray into a sensible order

12 years agoFix a type mismatch in the standard shader source
Mikko Rasa [Fri, 31 Aug 2012 07:06:54 +0000 (10:06 +0300)]
Fix a type mismatch in the standard shader source

12 years agoOnly call update_offset() once per append operation
Mikko Rasa [Thu, 30 Aug 2012 19:54:34 +0000 (22:54 +0300)]
Only call update_offset() once per append operation

12 years agoFix logic with appending Batches
Mikko Rasa [Thu, 30 Aug 2012 19:48:48 +0000 (22:48 +0300)]
Fix logic with appending Batches

Allow combining Batches of any primitive type with NV_primitive_restart,
and don't use it if not necessary.

12 years agoMake use of Bufferable in Batch
Mikko Rasa [Thu, 30 Aug 2012 19:42:52 +0000 (22:42 +0300)]
Make use of Bufferable in Batch

12 years agoMove Batch members around
Mikko Rasa [Thu, 30 Aug 2012 19:35:55 +0000 (22:35 +0300)]
Move Batch members around

The helper functions for changing data type don't really need to be
members, so put them in a private namespace.  Other functions rearranged
in a more sensible way.

12 years agoShader optimization
Mikko Rasa [Thu, 30 Aug 2012 19:01:55 +0000 (22:01 +0300)]
Shader optimization

ProgramBuilder can now collapse variables with only one reference into the
expression using it.  Fragment color expressions were tuned as well.

12 years agoException fixes
Mikko Rasa [Thu, 30 Aug 2012 08:41:15 +0000 (11:41 +0300)]
Exception fixes

Use out_of_range only when accessing arrays or array-like things, not for
general numeric arguments.

Armature::get_link functions now throw key_error since they behave like
map access externally.

12 years agoImprovements for shadow mapping
Mikko Rasa [Thu, 30 Aug 2012 06:03:39 +0000 (09:03 +0300)]
Improvements for shadow mapping

Depth bias is now configurable, and a darkness parameter was added.

12 years agoEntirely new system for building standard shaders
Mikko Rasa [Wed, 29 Aug 2012 21:48:58 +0000 (00:48 +0300)]
Entirely new system for building standard shaders

The old one was becoming such a huge mess that I had to spend two minutes
doing boolean analysis to figure out the conditions for a multiplication
operator.  The logic parser was also insufficient for expressing
sophisticated relationships between variables.

The new one operates with expression, starting from a target variable and
pulling in others to compute its value.  The logic parser is still there,
buts its burden is greatly reduced, as most of the work is done by the
dependency resolver.

Reflections are missing at the moment, but will be added back soon.  They
were pretty broken in the old system anyway, with the assumption that the
environment map is in eye space.

The generated shader code is rather verbose, containing a lot more local
variables than are needed.  An optimizer will be implemented in the near
future.

12 years agoDon't expose the shader type enum
Mikko Rasa [Tue, 28 Aug 2012 10:34:09 +0000 (13:34 +0300)]
Don't expose the shader type enum

Instead take an object oriented approach.

12 years agoRoute rendering calls through Renderer and add an exclusion system
Mikko Rasa [Tue, 28 Aug 2012 10:18:41 +0000 (13:18 +0300)]
Route rendering calls through Renderer and add an exclusion system

This is necessary for generating environment maps for an object, since
the object itself should not be included in the map.  The alternative is
to create a separate Scene, but that's rather clumsy.

12 years agoFix an uninitialized variable
Mikko Rasa [Tue, 28 Aug 2012 10:08:16 +0000 (13:08 +0300)]
Fix an uninitialized variable

12 years agoMore efficient stack management
Mikko Rasa [Tue, 28 Aug 2012 09:10:38 +0000 (12:10 +0300)]
More efficient stack management

Vectors are better than lists, since they don't need to allocate new
memory for every element.  A suitably sized reserve() does away with any
initial reallocations in most cases.

ProgramData in Renderer can be stored in a semi-independent stack as
well, since it can only be removed with a pop.  State is now devoid of
dynamically allocated memory, making the stack operations even faster.

12 years agoFix color equations in the standard shaders
Mikko Rasa [Tue, 28 Aug 2012 08:30:30 +0000 (11:30 +0300)]
Fix color equations in the standard shaders

The generated shader code assigned a scalar to a vec3 if lighting was
enabled without texture or material.  An unnecessary multiplication in
the alpha equation with texture but no material was removed.

Also fix texturing in the shader demo (Mesa does funny things with
uniforms).

12 years agoProvide the necessary uniforms from ShadowMap
Mikko Rasa [Tue, 28 Aug 2012 07:50:17 +0000 (10:50 +0300)]
Provide the necessary uniforms from ShadowMap

With the recent changes to the Effect and Renderer, it's finally possible
to avoid the need to specify the shadow map texture unit everywhere, and
get rid of the hardcoded gl_EyePlane* indices.

12 years agoTweak the shader functions in Renderer
Mikko Rasa [Tue, 28 Aug 2012 07:39:19 +0000 (10:39 +0300)]
Tweak the shader functions in Renderer

Since ProgramData is no longer tied to a single Program, we can retain it
over program changes.  This opens up some new possibilities, in
particular for Effects.

Also rename set_shader to set_shader_program.

12 years agoCheck the relevant extensions when using pixel formats
Mikko Rasa [Mon, 27 Aug 2012 21:05:08 +0000 (00:05 +0300)]
Check the relevant extensions when using pixel formats

12 years agoComplete rewrite of extension handling
Mikko Rasa [Mon, 27 Aug 2012 20:22:10 +0000 (23:22 +0300)]
Complete rewrite of extension handling

Prefer the promoted versions of extensions.  This improves compatibility
with OpenGL 3.0 and OpenGL ES 2.0.

Extension availability is now checked through global identifiers rather
than strings.  This eliminates the possibility of typos.

12 years agoRemove the global drawing functions
Mikko Rasa [Mon, 27 Aug 2012 20:15:23 +0000 (23:15 +0300)]
Remove the global drawing functions

12 years agoPull glDrawRangeElements from version_1_2.h
Mikko Rasa [Sun, 26 Aug 2012 21:46:25 +0000 (00:46 +0300)]
Pull glDrawRangeElements from version_1_2.h

12 years agoPass the Renderer to ObjectInstance::get_level_of_detail
Mikko Rasa [Sun, 26 Aug 2012 21:38:08 +0000 (00:38 +0300)]
Pass the Renderer to ObjectInstance::get_level_of_detail

As I recall, the camera was put in renderer to allow view-dependent
rendering without the need to pass data outside the rendering pipeline.
This is one of the cases where it is needed.

12 years agoRemove alignment where it doesn't belong
Mikko Rasa [Sun, 26 Aug 2012 21:37:01 +0000 (00:37 +0300)]
Remove alignment where it doesn't belong

12 years agoFix an incorrect extension name
Mikko Rasa [Sun, 26 Aug 2012 21:31:35 +0000 (00:31 +0300)]
Fix an incorrect extension name

12 years agoUse DerivedObjectLoader in Texture2D
Mikko Rasa [Sun, 26 Aug 2012 21:30:54 +0000 (00:30 +0300)]
Use DerivedObjectLoader in Texture2D

12 years agoBuffer fixes in ProgramData
Mikko Rasa [Sun, 26 Aug 2012 21:29:46 +0000 (00:29 +0300)]
Buffer fixes in ProgramData

Set proper usage hint, and delete the buffer in the destructor.

12 years agoLots of comment updates
Mikko Rasa [Sun, 26 Aug 2012 21:27:03 +0000 (00:27 +0300)]
Lots of comment updates

12 years agoImprovements to Bufferable
Mikko Rasa [Sun, 26 Aug 2012 19:20:16 +0000 (22:20 +0300)]
Improvements to Bufferable

Most members are now private, with read-only accessors, since the derived
classes should not modify them.  Some names were changed.

Add documentation to the class and all public/protected methods.

12 years agoDrop support for Renderables that don't accept a Renderer
Mikko Rasa [Sun, 26 Aug 2012 17:32:02 +0000 (20:32 +0300)]
Drop support for Renderables that don't accept a Renderer

The Renderer class is the way of the future and should be used whenever
possible.

12 years agoAvoid creating blocks for which there are no uniforms
Mikko Rasa [Sun, 26 Aug 2012 13:13:36 +0000 (16:13 +0300)]
Avoid creating blocks for which there are no uniforms

Since this requires finding the relevant uniforms before the block is
created, might as well store the list with the block for faster updates.

12 years agoAlign uniform blocks properly
Mikko Rasa [Sun, 26 Aug 2012 12:06:15 +0000 (15:06 +0300)]
Align uniform blocks properly

12 years agoImprove performance of Bufferable::update_buffer_data
Mikko Rasa [Sun, 26 Aug 2012 12:03:21 +0000 (15:03 +0300)]
Improve performance of Bufferable::update_buffer_data

... by avoiding the walk through the entire chain every time it is
called.  It's not necessary to add up all the sizes either, since we can
just get the end of the last Bufferable.

12 years agoGet all blocks for the program before applying them
Mikko Rasa [Sun, 26 Aug 2012 10:09:44 +0000 (13:09 +0300)]
Get all blocks for the program before applying them

This way, the correct size for the buffer can be determined right away,
rather than each block resizing it in turn.  Binding the buffer before
applying the blocks also avoids some thrashing.

12 years agoPass the UniformBlockInfo to get_block to avoid an unnecessary lookup
Mikko Rasa [Sun, 26 Aug 2012 09:42:14 +0000 (12:42 +0300)]
Pass the UniformBlockInfo to get_block to avoid an unnecessary lookup

12 years agoSort the uniforms in Program::UniformBlockInfo by offset
Mikko Rasa [Sun, 26 Aug 2012 08:01:12 +0000 (11:01 +0300)]
Sort the uniforms in Program::UniformBlockInfo by offset

12 years agoAlter the working logic of Bufferable to avoid some problems
Mikko Rasa [Sun, 26 Aug 2012 07:53:56 +0000 (10:53 +0300)]
Alter the working logic of Bufferable to avoid some problems

It was possible for the buffer data to be updated without going through
the dirty check in UniformBlock::apply, leaving the UniformBlock with a
null buf_range and resulting in a segfault.

12 years agoInitialize buf_range as null
Mikko Rasa [Sat, 25 Aug 2012 19:28:54 +0000 (22:28 +0300)]
Initialize buf_range as null

12 years agoDon't query array/matrix stride for uniforms which are not arrays/matrices
Mikko Rasa [Sat, 25 Aug 2012 19:28:05 +0000 (22:28 +0300)]
Don't query array/matrix stride for uniforms which are not arrays/matrices

12 years agoConstruct uniform buffers for named uniform blocks
Mikko Rasa [Fri, 24 Aug 2012 21:55:06 +0000 (00:55 +0300)]
Construct uniform buffers for named uniform blocks

12 years agoAdd a class to negotiate the storage of multiple objects in a buffer
Mikko Rasa [Fri, 24 Aug 2012 21:50:00 +0000 (00:50 +0300)]
Add a class to negotiate the storage of multiple objects in a buffer

12 years agoUniform handling fixes
Mikko Rasa [Fri, 24 Aug 2012 21:47:01 +0000 (00:47 +0300)]
Uniform handling fixes

Initialize strides to zero, and return a location of -1 for uniforms in
blocks.

12 years agoStore block pointer in uniform info
Mikko Rasa [Fri, 24 Aug 2012 21:46:24 +0000 (00:46 +0300)]
Store block pointer in uniform info

It greatly simplifies figuring out which uniforms are not in blocks.

12 years agoQuery information about uniform blocks when linking a Program
Mikko Rasa [Fri, 24 Aug 2012 16:05:43 +0000 (19:05 +0300)]
Query information about uniform blocks when linking a Program

12 years agoMove Program::bind to its proper place
Mikko Rasa [Fri, 24 Aug 2012 07:48:32 +0000 (10:48 +0300)]
Move Program::bind to its proper place

12 years agoUse typedefs in Program
Mikko Rasa [Fri, 24 Aug 2012 07:43:25 +0000 (10:43 +0300)]
Use typedefs in Program

12 years agoAdd the uniform buffer type
Mikko Rasa [Fri, 24 Aug 2012 07:29:08 +0000 (10:29 +0300)]
Add the uniform buffer type

12 years agoImprove binding of buffers
Mikko Rasa [Fri, 24 Aug 2012 07:25:52 +0000 (10:25 +0300)]
Improve binding of buffers

Add a set_current function, as seen in some other classes.

Buffer type support is now also checked in bind_to.

12 years agoAdd glBindBufferBase/Range functions to ARB_uniform_buffer_object
Mikko Rasa [Fri, 24 Aug 2012 07:16:36 +0000 (10:16 +0300)]
Add glBindBufferBase/Range functions to ARB_uniform_buffer_object

For some reason those functions are not tagged for the extension in
gl.spec.

12 years agoKeep track of buffer size
Mikko Rasa [Thu, 23 Aug 2012 09:32:30 +0000 (12:32 +0300)]
Keep track of buffer size

12 years agoMove some declarations around a bit
Mikko Rasa [Thu, 23 Aug 2012 06:30:20 +0000 (09:30 +0300)]
Move some declarations around a bit

12 years agoRemove the specialized setters from UniformBlock
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.

12 years agoAdd definitions for the GL_ARB_uniform_buffer_object extension
Mikko Rasa [Wed, 22 Aug 2012 13:08:50 +0000 (16:08 +0300)]
Add definitions for the GL_ARB_uniform_buffer_object extension

12 years agoUpdate gl.spec to latest version
Mikko Rasa [Wed, 22 Aug 2012 13:06:54 +0000 (16:06 +0300)]
Update gl.spec to latest version

12 years agoMake RenderPass shprog and shdata settable from code
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.

12 years agoAdd a shortcut constructor to Object
Mikko Rasa [Wed, 22 Aug 2012 11:22:36 +0000 (14:22 +0300)]
Add a shortcut constructor to Object

12 years agoAvoid re-applying shader data unnecessarily
Mikko Rasa [Tue, 21 Aug 2012 23:02:26 +0000 (02:02 +0300)]
Avoid re-applying shader data unnecessarily

12 years agoPlug a memory leak
Mikko Rasa [Tue, 21 Aug 2012 23:01:15 +0000 (02:01 +0300)]
Plug a memory leak

12 years agoUse uniform arrays in Bloom and AnimatedObject
Mikko Rasa [Tue, 21 Aug 2012 22:56:37 +0000 (01:56 +0300)]
Use uniform arrays in Bloom and AnimatedObject

12 years agoImplement uniform arrays
Mikko Rasa [Tue, 21 Aug 2012 10:12:03 +0000 (13:12 +0300)]
Implement uniform arrays

12 years agoRewrite the Uniform classes as templates
Mikko Rasa [Tue, 21 Aug 2012 09:58:36 +0000 (12:58 +0300)]
Rewrite the Uniform classes as templates

This makes adding new uniform types easier, especially arrays.

12 years agoConvert existing post-processors to use the provided common resources
Mikko Rasa [Mon, 20 Aug 2012 21:05:41 +0000 (00:05 +0300)]
Convert existing post-processors to use the provided common resources

12 years agoUse two FBOs in Pipeline when necessary
Mikko Rasa [Mon, 20 Aug 2012 20:55:59 +0000 (23:55 +0300)]
Use two FBOs in Pipeline when necessary

12 years agoAdd a color curve post-processor
Mikko Rasa [Mon, 20 Aug 2012 20:30:51 +0000 (23:30 +0300)]
Add a color curve post-processor

12 years agoHelper functions for post-processors
Mikko Rasa [Mon, 20 Aug 2012 20:27:28 +0000 (23:27 +0300)]
Helper functions for post-processors

Most post-processors render fullscreen quads and use a very basic vertex
shader, so it makes sense to provide these as common resources.

12 years agoSimplify Pipeline pass management
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.

12 years agoMove PipelinePass inside Pipeline and make the data members private
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.

12 years agoUse the hash function from mspcore
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.