Commit Graph

69 Commits

Author SHA1 Message Date
Alexis Maiquez
009321572e - removed custom glfw3 from the project as it's not needed anymore
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-28 02:31:51 +01:00
Alexis Maiquez
5bc0525493 ~ reorganized context initialization so opengl is ready
~ moved pixmap, gc and image creation to the initialization
  TODO: SUPPORT SCREEN SIZE CHANGES (THIS MIGHT NEED REINITIALIZATION OF THINGS)
~ moved fbo creation to initialization as it won't change anymore
~ reverted render code to the original loop as now the framebuffer is exactly as big as the whole display
~ moved glReadPixels off the wallpaper as that's code is exclusively used for screen rendering and not general rendering
~ XChangeProperty forces the update of the background, otherwise the compositor stops refreshing the screen and the background gets stuck
~ updated viewport variables to be integers instead of floats
~ reverted frame rendering code to be simpler and added the option to specify a framebuffer as target instead of screen

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-28 02:03:47 +01:00
Hynak
e56f128592 Added signal handling if the user terminates the program 2022-02-25 14:38:03 -05:00
Hynak
b2d4dd128d Hide GLFW for X Render 2022-02-25 14:27:56 -05:00
Alexis Maiquez
d5745b1cfa ~ Make use of the resolved path after startup and ensure it ends with a trailing slash.
Should fix @C0nvert 's issues on #59

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-18 19:02:55 +01:00
Alexis Maiquez
d5586b168b + Added checks for directories and ensuring specified wallpaper folder exists before initialization, fixes #70
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-02-11 15:50:54 +01:00
Alexis Maiquez
20c4ad3652 + Added better logging for asset loading errors and some extra information, should help get better information on #59
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-01-31 19:40:22 +01:00
Alexis Maiquez
a66bc26f1d ~ Fix issue #66, command-line parameters were not parsed properly
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-01-31 17:49:48 +01:00
Alexis Maiquez
f5ed023725 Fixed frame limiter to work properly with GLFW
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2022-01-25 00:17:14 +01:00
Alexis Maiquez
18ab051d47 ~ Fix background setup not working properly after the implementation of mouse support
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-12-04 23:44:17 +01:00
Alexis Maiquez
b55f2e8bf4 + Added PKGV0015 support
+ Added basic support for mouse position on shaders (still needs to be adjusted for backgrounds that are too big for the screen)
  (this makes XRAY effects work)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-12-03 02:02:46 +01:00
Alexis Maiquez
9d2e9b43ee ~ Fixed an infinite loop in the shader compiler
+ Added more valid variable types to the shader compiler so compilation doesn't fail

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-11-29 13:36:15 +01:00
Alexis Maiquez
adad3bd18c ~ Changed parser to give sane defaults to some values (like origin, scale and size for each object)
~ Improved path detection on command line arguments
- Removed references to old, deprecated options

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-11-29 12:57:15 +01:00
Alexis Maiquez
d041e6455e ~ Better error handling to show relevant messages when a package load doesn't work
+ Added support for loading PKGV0014

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-11-29 12:33:15 +01:00
Alexis Maiquez
f86eba347c ~ changed priority of assets loading, so background's assets should be loaded before looking into the assets folder
~ hopefully fixed effects that use shader targets so they now display properly

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-29 01:21:35 +02:00
Alexis Maiquez
5828b2ee80 + added some extra documentation on rendering based on observations and trial and error
~ 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>
2021-09-27 01:39:23 +02:00
Alexis Maiquez
48da16f7e5 ~ listen for screen size changes and setup proper viewport so everything is rendered from the center of the screen
~ fixed a typo on one of the vertex positions for the CWallpaper::render function

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-08 19:42:27 +02:00
Alexis Maiquez
0225cac917 ~ changed glfw to use a custom library version until upstream adds proper support for this
~ brought back proper background rendering and position detection

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-08 19:09:43 +02:00
Alexis Maiquez
0dc5228cf0 ~ fixed build issue with the tests on glfw3 native functions
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-08 16:16:45 +02:00
Alexis Maiquez
03c4660f5c ~ brought back path fixing functionality so all paths given in the command line now end with a /
+ added support for texture format definition (TEX0FORMAT) although it might need some more investigation (specially for multi-pass shaders)
+ added implicit conversion from vec3 to vec2 in shaders

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-05 21:53:37 +02:00
Alexis Maiquez
154fe905bc ~ brought back video support
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-05 21:52:16 +02:00
Alexis Maiquez
2ffb5f1b24 + added an extra render pass to render the scene upside down (so it looks fine)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-03 03:24:55 +02:00
Alexis Maiquez
16ed2f30de + added FreeImage for loading all the non-compiled textures (jpg, pngs, etc)
+ set proper glViewport instead of hardcoded 1920 by 1080 (this might require some changing and instead do a glViewport of the screen/window size and then scaling the backbuffers)
~ set proper texture size for pingpong buffers (to work with the viewport fixes)
- removed FREE_IMAGE_FORMAT as it's already included in the FreeImage library

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-02 23:59:00 +02:00
Alexis Maiquez
9d7d344b80 - removed commented code from main.cpp that is not useful anymore
~ changed how g_Time is calculated so any shader that uses it should behave properly
~ changed how the uniforms are set to a reinterpret_cast instead of static_cast to perform a direct pointer conversion (safe as we know the types were actually those types)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-02 22:30:38 +02:00
Alexis Maiquez
d9c12d0b58 - removed .idea folder as that shouldn't have been uploaded in the first place
~ changed g_Time to float instead of double

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2021-09-01 15:30:00 +02:00
Alexis Maiquez
dd76439901 ~ fixed a_TexCoord variable not having the correct values
- 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>
2021-08-31 02:29:28 +02:00
Alexis Maiquez
291b7e364a - removed/commented out most irrlicht-specific code
~ 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>
2021-08-31 01:14:08 +02:00
Alexis Maiquez
4309ca722d + properly set g_Time for shaders
+ 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>
2021-08-08 02:02:17 +02:00
IceCryptonym
5d5ce361fe
Initial video support without audio (#14)
* Adds FFmpeg to CMake
* Refactors to allow support for other wallpaper types
* Updates README.md for compilation requirements
* Initial video support without audio
* Properly support different wallpapers
* Fixes videos not rendering
* Nitpicks
* Moves code related to rendering from Core::CVideo to Render::CVideo
2020-04-27 18:50:17 +02:00
Alexis Maiquez
98e245b4cb + added error reporting for SDL initialization
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2020-03-31 23:32:46 +02:00
Alexis Maiquez
4358e7c173 - removed shader string constants, shaders do not have any, for future reference, these might be vectors or colors
+ shader constants now should be correctly applied as values for variables whenever possible

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 14:54:49 +02:00
Alexis Maiquez
d7cf8af7ca + created global variable storage for shaders
+ added g_Time to global variable storage
- removed global g_Time from main
~ changed "shader parameters" to "shader variables" as it's a more apt naming

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 13:27:18 +02:00
Alexis Maiquez
d03edb7c1e ~ cleaned up main function and moved initialization functions to a more proper place
~ check for SDL initialization before playing audio to prevent error messages when there is not really any error
~ changed a missed iterator to auto on CSound

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 12:55:45 +02:00
Alexis Maiquez
ce67c0bf64 ~ moved file resolution to the Irrlicht Context class
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 11:32:15 +02:00
Alexis Maiquez
3587fdec1e ~ changed all iterators to auto
~ changed most pointers to const references to prevent modification, specially from the background parser

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 11:02:45 +02:00
Alexis Maiquez
3371e10b01 ~ fixed segmentation fault when creating a scene
+ added check for texture rendering on startup
~ fixed possibly wrong texture size for passes
~ changed camera position

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 16:06:28 +02:00
Alexis Maiquez
e285b313e0 ~ use clearcolor from scene instead of using black
~ camera should use it's own getters, not access the m_camera object directly

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-09 09:46:29 +02:00
Alexis Maiquez
32a6a7af65 + Added parsing of shader constants for effects
~ Improved Shader Compiler parameter list to a better approach
+ Added support for one-pass effects with shaders (only first shader/pass will be applied)

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-08 21:09:19 +02:00
Alexis Maiquez
fc8778ab64 ~ More changes to the new parser to properly load object passes from JSON (combos, elements missing, shader, etc)
+ Added camera for new renderization code
+ Added scene for new renderization code
+ Added object for new renderization code
+ Added image for new renderization code
  WARNING: THIS IS A REGRESSION AS IN SHADERS ARE NOT AS COMPLETE AS IN THE MASTER BRANCH
~ New renderization code in place

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-06 15:54:41 +02:00
Alexis Maiquez
a40a83006e Merge branch 'master' of https://github.com/Almamu/linux-wallpaperengine into data-separation
# Conflicts:
#	main.cpp

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-06 14:41:41 +02:00
Alexis Maiquez
75fd581eac Merge branch 'data-separation' of https://github.com/Almamu/linux-wallpaperengine into data-separation
# Conflicts:
#	main.cpp
#	src/WallpaperEngine/video/renderer.cpp

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-05 17:26:58 +02:00
Alexis Maiquez
b8b3c2899d ~ Removed static variables in namespace WallpaperEngine::Irrlicht and moved to a context approach
This includes changes to old code to be compatible, the externs won't be used once the renderer is rewritten and the old code removed

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-05 17:24:16 +02:00
Alexis Maiquez
0ecc8b6e61 ~ Fixed getopt string not being correct
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-05 03:05:51 +02:00
Alexis Maiquez
ec29beca90 + Added FPS capping option for laptops
~ Changed default FPS cap to 30 FPS
~ Fixed bug where the windowed mode wasn't rendering anything

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-05 03:05:15 +02:00
Alexis Maiquez
eb60ea9029 Merge branch 'master' of github.com:Almamu/linux-wallpaperengine into data-separation
# Conflicts:
#	CMakeLists.txt
#	main.cpp
#	src/WallpaperEngine/video/renderer.cpp

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-04 23:04:01 +02:00
Alexis Maiquez
ce23ca53b1 ~ Reorganized viewport detection for screens and added proper checks for XRandr extension
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-04 22:23:47 +02:00
Alexis Maiquez
be68fe209f Merge branch 'master' of github.com:Almamu/linux-wallpaperengine 2019-09-04 22:08:49 +02:00
Alexis Maiquez
82c187fa76 ~ Support for displaying on background of specific screens instead of displaying on top, please carefuly read the README.md before using
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-04 22:08:32 +02:00
Alexis Maiquez
5c56e0860b ~ Moved Shader compiler to the proper, new namespace
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-02 12:19:42 +02:00
Alexis Maiquez
db89bf2e17 Merge branch 'master' of https://github.com/Almamu/linux-wallpaperengine into data-separation
# Conflicts:
#	main.cpp

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-02 11:50:07 +02:00