[DEV] change the fragment shader to be compatible with openGL ES2 and some other corrections
This commit is contained in:
parent
dcdd44aa54
commit
d9317dc227
2
build
2
build
@ -1 +1 @@
|
|||||||
Subproject commit d2180be4a67230150a2001920a600395c3190fd2
|
Subproject commit b3962202f4a5075ab7eb8f27be25b515a4206be4
|
@ -2,7 +2,6 @@
|
|||||||
precision mediump float;
|
precision mediump float;
|
||||||
precision mediump int;
|
precision mediump int;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct displayProperty {
|
struct displayProperty {
|
||||||
vec2 size;
|
vec2 size;
|
||||||
vec2 origin;
|
vec2 origin;
|
||||||
@ -37,7 +36,6 @@ void main(void) {
|
|||||||
S_colorFg[3] = vec4(0.0,0.7,0.0,0.4);
|
S_colorFg[3] = vec4(0.0,0.7,0.0,0.4);
|
||||||
// prevent origin moving ...
|
// prevent origin moving ...
|
||||||
vec2 position = v_position - EW_widgetProperty.origin;
|
vec2 position = v_position - EW_widgetProperty.origin;
|
||||||
|
|
||||||
float specialBorder = S_sizeBorder+S_sizePadding;
|
float specialBorder = S_sizeBorder+S_sizePadding;
|
||||||
vec2 endStart = EW_widgetProperty.size - vec2(S_sizePadding) - vec2(S_sizeBorder);
|
vec2 endStart = EW_widgetProperty.size - vec2(S_sizePadding) - vec2(S_sizeBorder);
|
||||||
vec2 endStop = EW_widgetProperty.size - vec2(S_sizePadding);
|
vec2 endStop = EW_widgetProperty.size - vec2(S_sizePadding);
|
||||||
@ -53,8 +51,9 @@ void main(void) {
|
|||||||
) {
|
) {
|
||||||
gl_FragColor = S_colorBorder;
|
gl_FragColor = S_colorBorder;
|
||||||
} else {
|
} else {
|
||||||
gl_FragColor = S_colorFg[EW_status.stateOld]*(1.0-EW_status.transition)
|
// note : int() is needed for the OpenGL ES platform
|
||||||
+ S_colorFg[EW_status.stateNew]*EW_status.transition;
|
gl_FragColor = S_colorFg[int(EW_status.stateOld)]*(1.0-EW_status.transition)
|
||||||
|
+ S_colorFg[int(EW_status.stateNew)]*EW_status.transition;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gl_FragColor = S_colorBg;
|
gl_FragColor = S_colorBg;
|
||||||
|
@ -55,8 +55,9 @@ void main(void) {
|
|||||||
// border ...
|
// border ...
|
||||||
gl_FragColor = S_colorBorder;
|
gl_FragColor = S_colorBorder;
|
||||||
} else {
|
} else {
|
||||||
gl_FragColor = S_colorFg[EW_status.stateOld]*(1.0-EW_status.transition)
|
// note : int() is needed for the OpenGL ES platform
|
||||||
+ S_colorFg[EW_status.stateNew]*EW_status.transition;
|
gl_FragColor = S_colorFg[int(EW_status.stateOld)]*(1.0-EW_status.transition)
|
||||||
|
+ S_colorFg[int(EW_status.stateNew)]*EW_status.transition;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gl_FragColor = S_colorBg;
|
gl_FragColor = S_colorBg;
|
||||||
|
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 5e87dea87f22b06103c5ff3f8087f28fcb4ae50c
|
Subproject commit ba9e2fca7bece1f46eac6f29c0ca5e2c54f59d89
|
2
external/parsersvg
vendored
2
external/parsersvg
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6ff447eadb51765b42574baf8d3dd2ed791af617
|
Subproject commit 8d360abdaef587b4eaf880467cb71eb122c1d9d1
|
@ -135,6 +135,10 @@ void ewol::ForceOrientation(ewol::orientation_te orientation)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ewol::SetIcon(etk::UString icon)
|
||||||
|
{
|
||||||
|
guiInterface::SetIcon(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,7 +87,6 @@ namespace ewol
|
|||||||
* @brief This is to transfert the event from one widget to another one
|
* @brief This is to transfert the event from one widget to another one
|
||||||
* @param source the widget where the event came from
|
* @param source the widget where the event came from
|
||||||
* @param destination the widget where the event mitgh be generated now
|
* @param destination the widget where the event mitgh be generated now
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destination);
|
void InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destination);
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -96,11 +95,16 @@ namespace ewol
|
|||||||
SCREEN_ORIENTATION_PORTRAIT,
|
SCREEN_ORIENTATION_PORTRAIT,
|
||||||
} orientation_te;
|
} orientation_te;
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief Force a specific orientation for mobile devices
|
||||||
* @param[in]
|
* @param[in] orientation the requested position.
|
||||||
*/
|
*/
|
||||||
void ForceOrientation(ewol::orientation_te orientation);
|
void ForceOrientation(ewol::orientation_te orientation);
|
||||||
|
/**
|
||||||
|
* @brief Set the Icon of the program
|
||||||
|
* @param[in] icon new filename icon of the curent program.
|
||||||
|
* @note Does not work on Andoid
|
||||||
|
*/
|
||||||
|
void SetIcon(etk::UString icon);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -614,5 +614,9 @@ void guiInterface::SetCursor(ewol::cursorDisplay_te newCursor)
|
|||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void guiInterface::SetIcon(etk::UString inputFile)
|
||||||
|
{
|
||||||
|
// nothing to do ...
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,6 +148,10 @@ void guiInterface::ClipBoardSet(ewol::clipBoard::clipboardListe_te clipboardID)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void guiInterface::SetIcon(etk::UString inputFile)
|
||||||
|
{
|
||||||
|
// TODO : ...
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@ -179,10 +183,6 @@ int guiInterface::main(int argc, const char *argv[])
|
|||||||
}
|
}
|
||||||
//start the basic thread :
|
//start the basic thread :
|
||||||
eSystem::Init();
|
eSystem::Init();
|
||||||
// get the icon file :
|
|
||||||
etk::UString myIcon = APP_Icon();
|
|
||||||
//SetIcon(myIcon);
|
|
||||||
|
|
||||||
// Run ...
|
// Run ...
|
||||||
Windows_Run();
|
Windows_Run();
|
||||||
// close windows system :
|
// close windows system :
|
||||||
|
@ -289,7 +289,7 @@ void guiInterface::SetTitle(etk::UString& title)
|
|||||||
#include <ewol/renderer/resources/image/ImagePNG.h>
|
#include <ewol/renderer/resources/image/ImagePNG.h>
|
||||||
#include <parserSVG/parserSVG.h>
|
#include <parserSVG/parserSVG.h>
|
||||||
|
|
||||||
void SetIcon(etk::UString inputFile)
|
void guiInterface::SetIcon(etk::UString inputFile)
|
||||||
{
|
{
|
||||||
draw::Image dataImage;
|
draw::Image dataImage;
|
||||||
// load data
|
// load data
|
||||||
@ -1334,9 +1334,6 @@ int guiInterface::main(int argc, const char *argv[])
|
|||||||
X11_Init();
|
X11_Init();
|
||||||
//start the basic thread :
|
//start the basic thread :
|
||||||
eSystem::Init();
|
eSystem::Init();
|
||||||
// get the icon file :
|
|
||||||
etk::UString myIcon = APP_Icon();
|
|
||||||
SetIcon(myIcon);
|
|
||||||
// Run ...
|
// Run ...
|
||||||
X11_Run();
|
X11_Run();
|
||||||
// close X11 :
|
// close X11 :
|
||||||
|
@ -82,13 +82,17 @@ namespace guiInterface
|
|||||||
* @param[in] newCursor selected new cursor.
|
* @param[in] newCursor selected new cursor.
|
||||||
*/
|
*/
|
||||||
void SetCursor(ewol::cursorDisplay_te newCursor);
|
void SetCursor(ewol::cursorDisplay_te newCursor);
|
||||||
|
/**
|
||||||
|
* @brief Set the Icon of the program
|
||||||
|
* @param[in] inputFile new filename icon of the curent program.
|
||||||
|
*/
|
||||||
|
void SetIcon(etk::UString inputFile);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//!< must be define in CPP by the application ... this are the main init and unInit of the Application
|
//!< must be define in CPP by the application ... this are the main init and unInit of the Application
|
||||||
void APP_Init(void);
|
void APP_Init(void);
|
||||||
void APP_UnInit(void);
|
void APP_UnInit(void);
|
||||||
etk::UString APP_Icon(void);
|
|
||||||
|
|
||||||
#define NB_MAX_INPUT (20)
|
#define NB_MAX_INPUT (20)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user