Skip to content

Commit

Permalink
Merge pull request #15 from AlwinEsch/master
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
AlwinEsch authored Mar 19, 2019
2 parents 544ba4f + c15b70a commit 414d2d1
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(screensaver.greynetic)

cmake_minimum_required(VERSION 3.3)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})

enable_language(CXX)

find_package(Kodi REQUIRED)

if(NOT WIN32)
Expand Down
2 changes: 1 addition & 1 deletion screensaver.greynetic/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="screensaver.greynetic"
version="2.2.0"
version="2.2.1"
name="Greynetic"
provider-name="spiff">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
10 changes: 10 additions & 0 deletions screensaver.greynetic/resources/shaders/GL/frag.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#version 150

in vec4 v_color;

out vec4 fragColor;

void main()
{
fragColor = v_color;
}
14 changes: 14 additions & 0 deletions screensaver.greynetic/resources/shaders/GL/vert.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#version 150

uniform mat4 u_projModelMat;

in vec4 a_position;
in vec4 a_color;

out vec4 v_color;

void main ()
{
gl_Position = u_projModelMat * a_position;
v_color = a_color;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#ifndef GL_ES
#define lowp
#endif
#version 100

varying lowp vec4 v_color;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#version 100

uniform mat4 u_projModelMat;

attribute vec4 a_position;
Expand Down
4 changes: 2 additions & 2 deletions src/GreyNetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ CScreensaverGreyNetic::~CScreensaverGreyNetic()
bool CScreensaverGreyNetic::Start()
{
#ifndef WIN32
if (!LoadShaderFiles(kodi::GetAddonPath("resources/shaders/vert.glsl"),
kodi::GetAddonPath("resources/shaders/frag.glsl")))
if (!LoadShaderFiles(kodi::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/vert.glsl"),
kodi::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/frag.glsl")))
{
kodi::Log(ADDON_LOG_ERROR, "Failed to load GL shaders");
return false;
Expand Down

0 comments on commit 414d2d1

Please sign in to comment.