I think that there needs to be a re-work or re-specification of
the text pipeline works to make the functions/methods more
intuitive rather than them being prefixed with "text".
number of rendered elements.
This was pretty easy since the elements were getting re-allocated
in the graphics card every frame. TODO would be to make the
re-allocation not happen every frame but rather only happen when
a re-allocation is nescessary and rather just not fully re-populate
the buffer if not every element is used or have some other sort of
automated way of handling the VRAM.
Also moved all the code for each pipeline into the header files
rather than the .cpp files to keep it all in one place.
Considering just moving all the code into one file just to make it
easier to create new pipelines but that may be overkill and may
make the project harder to maintain in the future.
Changing the mechanic of the renderer to support pipelines.
One scene could have multiple pipelines. The pipelines allow for
one shader, one camera, and multiple batches.
The problem was caused by vector re-allocation. This is a similar
problem to what happened with the mesh factory. It was solved by
converting the texture factory to use lists instead of vectors.
The reason for using lists is to prevent the need for explicit
deallocation of resources and instead allow the use of a list to
automatically allocate/deallocate the textures/samplers/meshes.
There is an OpenGL error (1282) invalid operation that is getting
caught when switching to the imagescene. This needs to get fixed
and then hopefully the whole thing will work.
Added image scene to render an image in a scene. There is also now
a testing image that is an uber meme. Currently the problem is
that the spritebatch cannot use the offsetof macro because it is a
templated class. Possible solutions to this are changing it to be
specifyable or implemented per vertex type as the other batches
have been.
The sprite inherits from Poseable. It is intended to allow for
pure 2D rendering or integration of sprites/particles into 3D
scenes. Eventually an ImageScene should be created to test out the
image loading, sprite movement and rotation, and 2D camera
functionality for the builtin engine.
MyBuiltinTexturedScene (number 7) displays a cube that loads its
faces from a hard-coded texture. Mipmaping is supported. Just use
the XXX_MIPMAP_XXX Min/Mag filters to use it. TODO next is
combining lighting and textures and then up after that is shadows.
I may just do lighting and shadows before lighting, shadows, and
textures.
Want to use seperate textures and samplers for the scene to allow
for more modularization. Currently have created a texture class
and started creating a scene class.
Now, LitScene allows for simple lighting. (Shadows still to come).
Ambient, specular, and diffuse lighting available and each mesh's
vertex can define a material that defines its reflectivity. An
example scene was added to the MyApplication as the scene for the
6 button.