diff --git a/data/color3.frag b/data/color3.frag index cb8e54cd..0d439173 100644 --- a/data/color3.frag +++ b/data/color3.frag @@ -6,5 +6,5 @@ precision mediump int; varying vec4 f_color; void main(void) { - gl_FragColor = f_color; + gl_FragColor = f_color; } diff --git a/data/color3.vert b/data/color3.vert index 47fe50e9..d12c73b9 100644 --- a/data/color3.vert +++ b/data/color3.vert @@ -5,13 +5,14 @@ precision mediump int; // Input : attribute vec3 EW_coord3d; -uniform vec4 EW_color; +attribute vec4 EW_color; uniform mat4 EW_MatrixTransformation; +uniform mat4 EW_MatrixPosition; // output : varying vec4 f_color; 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; } diff --git a/ewol/compositing/Drawing.h b/ewol/compositing/Drawing.h index 7dfab715..382a2515 100644 --- a/ewol/compositing/Drawing.h +++ b/ewol/compositing/Drawing.h @@ -33,7 +33,7 @@ namespace ewol { int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix) int32_t m_GLMatrixPosition; //!< position matrix 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 m_coord; //!< internal position for the text display std::vector > m_coordColor; //!< internal color of the background public: diff --git a/ewol/compositing/Text.cpp b/ewol/compositing/Text.cpp index d28a9371..9b26e227 100644 --- a/ewol/compositing/Text.cpp +++ b/ewol/compositing/Text.cpp @@ -72,10 +72,9 @@ void ewol::compositing::Text::drawMT(const mat4& _transformationMatrix, bool _en void ewol::compositing::Text::drawD(bool _disableDepthTest) { // draw BG in any case: - m_vectorialDraw.draw(); + m_vectorialDraw.draw(_disableDepthTest); if (m_coord.size() <= 0 || m_font == nullptr) { - // TODO : a remèe ... //EWOL_WARNING("Nothink to draw..."); return; } diff --git a/ewol/context/Context.cpp b/ewol/context/Context.cpp index 9d452df4..a411f8ea 100644 --- a/ewol/context/Context.cpp +++ b/ewol/context/Context.cpp @@ -123,7 +123,7 @@ void ewol::Context::onResume(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 if (m_windowsCurrent == nullptr) { EWOL_INFO("No windows ..."); @@ -138,7 +138,7 @@ void ewol::Context::onRegenerateDisplay(gale::Context& _context) { } void ewol::Context::onDraw(gale::Context& _context) { - EWOL_INFO("DRAW"); + //EWOL_INFO("DRAW"); // clean internal data... m_objectManager.cleanInternalRemoved(); // real draw... @@ -201,6 +201,7 @@ void ewol::Context::onKeyboard(gale::key::Special& _special, enum gale::key::keyboard _type, char32_t _value, gale::key::status _state) { + EWOL_VERBOSE("event {" << _special << "} " << _type << " " << _value << " " << _state); // store the keyboard special key status for mouse event... m_input.setLastKeyboardSpecial(_special); if (m_windowsCurrent == nullptr) { @@ -224,7 +225,7 @@ void ewol::Context::onKeyboard(gale::key::Special& _special, return; } // 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 || ( repeate == true && tmpWidget->getKeyboardRepeate() == true) ) { @@ -244,7 +245,6 @@ void ewol::Context::onKeyboard(gale::key::Special& _special, } tmpWidget->systemEventEntry(tmpEntryEvent); } else { // THREAD_KEYBORAD_MOVE - EWOL_DEBUG("THREAD_KEYBORAD_MOVE" << _type << " " << _state); ewol::event::EntrySystem tmpEntryEvent(_type, gale::key::status_up, _special, @@ -294,6 +294,16 @@ ewol::Context::~Context() { // 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 bool ewol::Context::OS_Draw(bool _displayEveryTime) { int64_t currentTime = ewol::getTime(); @@ -411,7 +421,7 @@ std::shared_ptr ewol::Context::getWindows() { return m_windowsCurrent; }; void ewol::Context::onResize(const ivec2& _size) { - EWOL_ERROR("Resize: " << _size); + EWOL_VERBOSE("Resize: " << _size); forceRedrawAll(); } diff --git a/ewol/context/Context.h b/ewol/context/Context.h index a1ca01d1..19e3d803 100644 --- a/ewol/context/Context.h +++ b/ewol/context/Context.h @@ -201,6 +201,12 @@ namespace ewol { */ virtual bool systemKeyboradEvent(enum gale:key::keyboardSystem _key, bool _down); #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. diff --git a/ewol/widget/Button.cpp b/ewol/widget/Button.cpp index 4c7948b3..1161b3c8 100644 --- a/ewol/widget/Button.cpp +++ b/ewol/widget/Button.cpp @@ -205,6 +205,7 @@ void ewol::widget::Button::changeStatusIn(int32_t _newStatusId) { void ewol::widget::Button::periodicCall(const ewol::event::Time& _event) { + EWOL_INFO("periodic : " << _event); if (false == m_shaper->periodicCall(_event) ) { periodicCallDisable(); } diff --git a/ewol/widget/Widget.cpp b/ewol/widget/Widget.cpp index d5ed4e6c..d492d648 100644 --- a/ewol/widget/Widget.cpp +++ b/ewol/widget/Widget.cpp @@ -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 ..."); m_userMinSize = gale::Dimension(vec2(0,0),gale::Dimension::Pixel); } - // TODO : requestUpdateSize(); + requestUpdateSize(); } else if (_paramPointer == m_annimationTypeStart) { } else if (_paramPointer == m_annimationTimeStart) { @@ -679,7 +679,7 @@ void ewol::Widget::onParameterChangeValue(const ewol::parameter::Ref& _paramPoin } void ewol::Widget::requestUpdateSize() { - // TODO : getContext().requestUpdateSize(); + getContext().requestUpdateSize(); } ewol::widget::Manager& ewol::Widget::getWidgetManager() {