diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 6738097..ba0366a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -13,10 +13,8 @@
-
-
-
+
@@ -29,11 +27,11 @@
-
+
-
-
+
+
@@ -41,31 +39,11 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -84,9 +62,11 @@
-
-
-
+
+
+
+
+
@@ -94,18 +74,40 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -124,8 +126,8 @@
-
-
+
+
@@ -135,7 +137,6 @@
- context
GL_INVA
GLSL TEST
arb
@@ -164,6 +165,7 @@
changeWorkingDirectory
::fileResolver
"."
+ ->render
Failed
@@ -214,7 +216,6 @@
-
@@ -223,6 +224,7 @@
+
@@ -341,12 +343,12 @@
-
+
-
+
@@ -422,12 +424,12 @@
- file://$PROJECT_DIR$/wallpaperengine/fs/fileResolver.cpp
- 106
-
+ file://$PROJECT_DIR$/wallpaperengine/video/renderer.cpp
+ 52
+
-
+
@@ -473,6 +475,7 @@
+
@@ -564,20 +567,11 @@
-
-
-
-
-
-
-
-
-
-
+
@@ -589,19 +583,12 @@
-
-
-
-
-
-
-
-
+
@@ -615,14 +602,6 @@
-
-
-
-
-
-
-
-
@@ -656,22 +635,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -731,37 +694,81 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wallpaperengine/image.cpp b/wallpaperengine/image.cpp
index 20e2e53..31c87ad 100644
--- a/wallpaperengine/image.cpp
+++ b/wallpaperengine/image.cpp
@@ -129,8 +129,12 @@ namespace wp
{
this->getMaterial ().setTexture (i, (*cur)->getIrrTexture ());
}
- }
+ // set basic material flags
+ this->setType (irr::video::EMT_TRANSPARENT_ALPHA_CHANNEL);
+ this->setFlag (irr::video::EMF_LIGHTING, false);
+ this->setFlag (irr::video::EMF_BLEND_OPERATION, true);
+ }
void image::setFlag(irr::video::E_MATERIAL_FLAG flag, bool newvalue)
@@ -150,12 +154,14 @@ namespace wp
void image::render ()
{
+ if (this->m_visible == false) return;
+
uint16_t indices[] =
{
0, 1, 2, 3
};
- wp::irrlicht::driver->setMaterial (this->m_material);
+ wp::irrlicht::driver->setMaterial (this->getMaterial ());
wp::irrlicht::driver->drawVertexPrimitiveList (this->m_vertices, 4, indices, 1, irr::video::EVT_STANDARD, irr::scene::EPT_QUADS, irr::video::EIT_16BIT);
}
diff --git a/wallpaperengine/texture.cpp b/wallpaperengine/texture.cpp
index 8edd2b4..cb67dad 100644
--- a/wallpaperengine/texture.cpp
+++ b/wallpaperengine/texture.cpp
@@ -1,16 +1,17 @@
#include
+#include "irrlicht.h"
namespace wp
{
texture::texture (irr::io::path file)
{
-
+ this->m_texture = wp::irrlicht::driver->getTexture (file);
}
irr::video::ITexture* texture::getIrrTexture ()
{
- return nullptr;
+ return this->m_texture;
}
}
\ No newline at end of file