[DEV] some corretion with gale

This commit is contained in:
Edouard DUPIN 2015-08-21 23:35:35 +02:00
parent 6560b59eab
commit 3fc18f8e1d
8 changed files with 30 additions and 13 deletions

View File

@ -6,5 +6,5 @@ precision mediump int;
varying vec4 f_color; varying vec4 f_color;
void main(void) { void main(void) {
gl_FragColor = f_color; gl_FragColor = f_color;
} }

View File

@ -5,13 +5,14 @@ precision mediump int;
// Input : // Input :
attribute vec3 EW_coord3d; attribute vec3 EW_coord3d;
uniform vec4 EW_color; attribute vec4 EW_color;
uniform mat4 EW_MatrixTransformation; uniform mat4 EW_MatrixTransformation;
uniform mat4 EW_MatrixPosition;
// output : // output :
varying vec4 f_color; varying vec4 f_color;
void main(void) { void main(void) {
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0); gl_Position = EW_MatrixTransformation * EW_MatrixPosition * vec4(EW_coord3d, 1.0);
f_color = EW_color; f_color = EW_color;
} }

View File

@ -33,7 +33,7 @@ namespace ewol {
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix) int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
int32_t m_GLMatrixPosition; //!< position matrix int32_t m_GLMatrixPosition; //!< position matrix
int32_t m_GLColor; //!< openGL id on the element (color buffer) int32_t m_GLColor; //!< openGL id on the element (color buffer)
private: // Background Color (display only when needed) public: // Background Color (display only when needed)
std::vector<vec3 > m_coord; //!< internal position for the text display std::vector<vec3 > m_coord; //!< internal position for the text display
std::vector<etk::Color<float> > m_coordColor; //!< internal color of the background std::vector<etk::Color<float> > m_coordColor; //!< internal color of the background
public: public:

View File

@ -72,10 +72,9 @@ void ewol::compositing::Text::drawMT(const mat4& _transformationMatrix, bool _en
void ewol::compositing::Text::drawD(bool _disableDepthTest) { void ewol::compositing::Text::drawD(bool _disableDepthTest) {
// draw BG in any case: // draw BG in any case:
m_vectorialDraw.draw(); m_vectorialDraw.draw(_disableDepthTest);
if (m_coord.size() <= 0 || m_font == nullptr) { if (m_coord.size() <= 0 || m_font == nullptr) {
// TODO : a remèe ...
//EWOL_WARNING("Nothink to draw..."); //EWOL_WARNING("Nothink to draw...");
return; return;
} }

View File

@ -123,7 +123,7 @@ void ewol::Context::onResume(gale::Context& _context) {
} }
void ewol::Context::onRegenerateDisplay(gale::Context& _context) { void ewol::Context::onRegenerateDisplay(gale::Context& _context) {
EWOL_INFO("REGENERATE_DISPLAY"); //EWOL_INFO("REGENERATE_DISPLAY");
// check if the user selected a windows // check if the user selected a windows
if (m_windowsCurrent == nullptr) { if (m_windowsCurrent == nullptr) {
EWOL_INFO("No windows ..."); EWOL_INFO("No windows ...");
@ -138,7 +138,7 @@ void ewol::Context::onRegenerateDisplay(gale::Context& _context) {
} }
void ewol::Context::onDraw(gale::Context& _context) { void ewol::Context::onDraw(gale::Context& _context) {
EWOL_INFO("DRAW"); //EWOL_INFO("DRAW");
// clean internal data... // clean internal data...
m_objectManager.cleanInternalRemoved(); m_objectManager.cleanInternalRemoved();
// real draw... // real draw...
@ -201,6 +201,7 @@ void ewol::Context::onKeyboard(gale::key::Special& _special,
enum gale::key::keyboard _type, enum gale::key::keyboard _type,
char32_t _value, char32_t _value,
gale::key::status _state) { gale::key::status _state) {
EWOL_VERBOSE("event {" << _special << "} " << _type << " " << _value << " " << _state);
// store the keyboard special key status for mouse event... // store the keyboard special key status for mouse event...
m_input.setLastKeyboardSpecial(_special); m_input.setLastKeyboardSpecial(_special);
if (m_windowsCurrent == nullptr) { if (m_windowsCurrent == nullptr) {
@ -224,7 +225,7 @@ void ewol::Context::onKeyboard(gale::key::Special& _special,
return; return;
} }
// check if the widget allow repeating key events. // check if the widget allow repeating key events.
//EWOL_DEBUG("repeating test :" << data->repeateKey << " widget=" << tmpWidget->getKeyboardRepeate() << " state=" << data->stateIsDown); //EWOL_INFO("repeating test :" << repeate << " widget=" << tmpWidget->getKeyboardRepeate() << " state=" << isDown);
if( repeate == false if( repeate == false
|| ( repeate == true || ( repeate == true
&& tmpWidget->getKeyboardRepeate() == true) ) { && tmpWidget->getKeyboardRepeate() == true) ) {
@ -244,7 +245,6 @@ void ewol::Context::onKeyboard(gale::key::Special& _special,
} }
tmpWidget->systemEventEntry(tmpEntryEvent); tmpWidget->systemEventEntry(tmpEntryEvent);
} else { // THREAD_KEYBORAD_MOVE } else { // THREAD_KEYBORAD_MOVE
EWOL_DEBUG("THREAD_KEYBORAD_MOVE" << _type << " " << _state);
ewol::event::EntrySystem tmpEntryEvent(_type, ewol::event::EntrySystem tmpEntryEvent(_type,
gale::key::status_up, gale::key::status_up,
_special, _special,
@ -294,6 +294,16 @@ ewol::Context::~Context() {
// nothing to do ... // nothing to do ...
} }
void ewol::Context::requestUpdateSize() {
gale::Context& context = gale::getContext();
context.requestUpdateSize();
}
void ewol::Context::onPeriod(int64_t _time) {
EWOL_ERROR("_time=" << _time);
m_objectManager.timeCall(_time);
}
#if 0 #if 0
bool ewol::Context::OS_Draw(bool _displayEveryTime) { bool ewol::Context::OS_Draw(bool _displayEveryTime) {
int64_t currentTime = ewol::getTime(); int64_t currentTime = ewol::getTime();
@ -411,7 +421,7 @@ std::shared_ptr<ewol::widget::Windows> ewol::Context::getWindows() {
return m_windowsCurrent; return m_windowsCurrent;
}; };
void ewol::Context::onResize(const ivec2& _size) { void ewol::Context::onResize(const ivec2& _size) {
EWOL_ERROR("Resize: " << _size); EWOL_VERBOSE("Resize: " << _size);
forceRedrawAll(); forceRedrawAll();
} }

View File

@ -201,6 +201,12 @@ namespace ewol {
*/ */
virtual bool systemKeyboradEvent(enum gale:key::keyboardSystem _key, bool _down); virtual bool systemKeyboradEvent(enum gale:key::keyboardSystem _key, bool _down);
#endif #endif
public:
/**
* @brief Request a display after call a resize
*/
void requestUpdateSize();
virtual void onPeriod(int64_t _time);
}; };
/** /**
* @brief From everyware in the program, we can get the context inteface. * @brief From everyware in the program, we can get the context inteface.

View File

@ -205,6 +205,7 @@ void ewol::widget::Button::changeStatusIn(int32_t _newStatusId) {
void ewol::widget::Button::periodicCall(const ewol::event::Time& _event) { void ewol::widget::Button::periodicCall(const ewol::event::Time& _event) {
EWOL_INFO("periodic : " << _event);
if (false == m_shaper->periodicCall(_event) ) { if (false == m_shaper->periodicCall(_event) ) {
periodicCallDisable(); periodicCallDisable();
} }

View File

@ -666,7 +666,7 @@ void ewol::Widget::onParameterChangeValue(const ewol::parameter::Ref& _paramPoin
EWOL_ERROR("Can not set a 'min size' > 'max size' set nothing ..."); EWOL_ERROR("Can not set a 'min size' > 'max size' set nothing ...");
m_userMinSize = gale::Dimension(vec2(0,0),gale::Dimension::Pixel); m_userMinSize = gale::Dimension(vec2(0,0),gale::Dimension::Pixel);
} }
// TODO : requestUpdateSize(); requestUpdateSize();
} else if (_paramPointer == m_annimationTypeStart) { } else if (_paramPointer == m_annimationTypeStart) {
} else if (_paramPointer == m_annimationTimeStart) { } else if (_paramPointer == m_annimationTimeStart) {
@ -679,7 +679,7 @@ void ewol::Widget::onParameterChangeValue(const ewol::parameter::Ref& _paramPoin
} }
void ewol::Widget::requestUpdateSize() { void ewol::Widget::requestUpdateSize() {
// TODO : getContext().requestUpdateSize(); getContext().requestUpdateSize();
} }
ewol::widget::Manager& ewol::Widget::getWidgetManager() { ewol::widget::Manager& ewol::Widget::getWidgetManager() {