-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
161 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "LoadingScreen.h" | ||
|
||
namespace skinny { | ||
|
||
//-------------------------------------------------------------- | ||
bool LoadingScreen::reload(const ShowDescription& description) | ||
{ | ||
note_ = description.getLoadingScreensNote(); | ||
|
||
img_.clear(); | ||
|
||
const auto& path = description.getLoadingScreensPath(); | ||
if (!path.empty()) | ||
{ | ||
return img_.load(path); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
//-------------------------------------------------------------- | ||
const ofTexture& LoadingScreen::getNext() const | ||
{ | ||
return img_.getTexture(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include "Playable.h" | ||
#include "Meta.h" | ||
|
||
#include "ofImage.h" | ||
|
||
namespace skinny { | ||
|
||
class LoadingScreen : public Playable { | ||
public: | ||
bool reload(const ShowDescription& description); | ||
|
||
const ofTexture& getNext() const; | ||
|
||
private: | ||
// #TODO more img | ||
// ##TODO timing | ||
|
||
ofImage img_; | ||
|
||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#version 440 | ||
|
||
in vec2 texCoordVarying; | ||
|
||
layout(binding = 0) uniform sampler2DRect previousPass; | ||
layout(binding = 1) uniform sampler2DRect loadingScreen; | ||
|
||
uniform bool playing; | ||
|
||
out vec4 outputColor; | ||
|
||
//-------------------------------------------------------------- | ||
void main() | ||
{ | ||
vec3 blended = texture(previousPass, texCoordVarying).rgb; | ||
|
||
if (playing) | ||
{ | ||
vec3 screen = texture(loadingScreen, texCoordVarying).rgb; | ||
blended += screen; | ||
blended = clamp(blended, vec3(0.0), vec3(1.0)); | ||
} | ||
|
||
outputColor = vec4(blended, 1.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#version 440 | ||
|
||
in vec4 position; | ||
uniform mat4 modelViewProjectionMatrix; | ||
|
||
out vec2 texCoordVarying; | ||
|
||
//-------------------------------------------------------------- | ||
void main(){ | ||
texCoordVarying = position.xy; // y no in texcoord?? | ||
gl_Position = modelViewProjectionMatrix * position; | ||
} |