- Separated program args parsing and validation from initialization code
- Application's main body in it's own class
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Simplified how passes rendering works and separated it into a two stages process
Setup (prepares shaders, uniforms, attributes, etc)
Render (only performs the actual rendering)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Added support for color blend mode
Main pass' blendmode should be normal
Last pass' blendmode should be the first's
Fixed order of glClear's so _rt_FullFrameBuffer is the right color at the right time
Simplified effect and pass creation code a bit more
Non-visible images should render the full chain into the pingpong framebuffers instead of to screen
Fixed an integer division not producing float numbers
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Simplified texture decision graph and preload it so render is quicker
Improved material detecion on shaders
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Further improvements on detection of combo values for shaders
Support for detecting visibility settings on effects
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
~ shader passes now won't try to detect projection, texcoord or position, as this'll be specified as parameters
~ removed useless variables being stored
~ model view projection matrix is now stored by image, not by pass
~ proper calculation of centered images
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
~ material's binds are now a map by index so it's easier to use
- removed depth buffer for FBOs as they're not really useful (at least for now)
~ separated image setup in two stages so FBO creation happens before actually requiring them
- removed ping-pong FBOs where they didn't make sense
~ image's should now render to scene buffer directly whenever possible
~ better support for FBO scaling
~ rendering should now take into account targets and binds in a much better way
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
~ deprecated --dir --pkg options, the software will automatically detect the background we're loading
+ first draft of FBO support, there's still some extra work to do
~ texture header is now hidden behind getters so the textures can be any kind of source
~ proper setting of resolution and translation variables for textures
~ simplified call flow for any pass rendering, removing render functions on effect and material
~ framebuffer setup has to happen before object setup in the scene
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
+ added helper to parse vector4 data from json
- removed some old, commented out code
+ added support for getting textures from the shader's code too (fixes masks on some backgrounds)
+ added support for shader varibles with default values from shader's source code
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
+ added texture resolution to CTexture so it can be properly used in the CPass
+ framebuffer textures now have filtering specified (prevents black screen), still need to adjust information about the texture
+ added proper uniform variable registration to ease the usage
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
- removed irrlicht functions and types from the active codebase so it's no longer required at compile time (CContext still there as the code might be still be useful)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
~ written close to equivalent versions in OpenGL code using GLM and GLFW
~ written replacements for texture and package loading to not use irrlicht anymore
~ updated shader compiler as we now don't need to replace attributes anymore
+ added support for texture flags in the texture header (as they're needed for opengl to get proper information)
TODO: REWRITE VIDEO PLAYER SUPPORT AS THIS UPDATE EFFECTIVELY BREAKS IT
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
+ properly set g_TextureXResolution for shaders
+ properly set g_TextureX for shaders
+ properly set g_TextureXRotation for shaders
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
~ removed reduntant code from CImage and made use of the new versions of the same code on CEffect, CMaterial and CPass to simplify the rendering code and make it easier to read
TODO: FIX MATRIX THAT VERTICALLY FLIPS THE IMAGES!
~ properly linked output from CMaterial, CEffect and CPass so a full render pass outputs something to the screen
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
+ added parsing of bind section for shader passes
~ various new classes to properly handle texture targets, shader passes and materials
Signed-off-by: Alexis Maiquez <almamu@almamu.com>