[DEV] missing somme element
This commit is contained in:
parent
1598324f57
commit
01e5b2dc2a
@ -53,3 +53,9 @@ void ewol::Compositing::Clear(void)
|
||||
{
|
||||
m_matrixApply.Identity();
|
||||
}
|
||||
|
||||
|
||||
void ewol::Compositing::SetMatrix(mat4 mat)
|
||||
{
|
||||
m_matrixApply = mat;
|
||||
}
|
||||
|
@ -55,6 +55,11 @@ namespace ewol
|
||||
* @param[in] vect The scaling vector to apply at the transformation matrix
|
||||
*/
|
||||
virtual void Scale(vec3 vect);
|
||||
/**
|
||||
* @brief set the transformation matrix
|
||||
* @param[in] mat The new matrix.
|
||||
*/
|
||||
virtual void SetMatrix(mat4 mat);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -447,7 +447,8 @@ void ewol::Drawing::LineTo(vec3 dest)
|
||||
{
|
||||
ResetCount();
|
||||
InternalSetColor(m_color);
|
||||
if (m_position.x() == dest.x() && m_position.y() == dest.y()) {
|
||||
EWOL_DEBUG("DrawLine : " << m_position << " to " << dest);
|
||||
if (m_position.x() == dest.x() && m_position.y() == dest.y() && m_position.z() == dest.z()) {
|
||||
EWOL_WARNING("Try to draw an line width 0");
|
||||
return;
|
||||
}
|
||||
@ -467,13 +468,13 @@ void ewol::Drawing::LineTo(vec3 dest)
|
||||
float offsety = sin(teta-M_PI/2) * (m_thickness/2);
|
||||
float offsetx = cos(teta-M_PI/2) * (m_thickness/2);
|
||||
|
||||
SetPoint(vec3(m_position.x() - offsetx, m_position.y() - offsety, (float)0.0) );
|
||||
SetPoint(vec3(m_position.x() + offsetx, m_position.y() + offsety, (float)0.0) );
|
||||
SetPoint(vec3(dest.x() + offsetx, dest.y() + offsety, (float)0.0) );
|
||||
SetPoint(vec3(m_position.x() - offsetx, m_position.y() - offsety, m_position.z()) );
|
||||
SetPoint(vec3(m_position.x() + offsetx, m_position.y() + offsety, m_position.z()) );
|
||||
SetPoint(vec3(dest.x() + offsetx, dest.y() + offsety, m_position.z()) );
|
||||
|
||||
SetPoint(vec3(dest.x() + offsetx, dest.y() + offsety, (float)0.0) );
|
||||
SetPoint(vec3(dest.x() - offsetx, dest.y() - offsety, (float)0.0) );
|
||||
SetPoint(vec3(m_position.x() - offsetx, m_position.y() - offsety, (float)0.0) );
|
||||
SetPoint(vec3(dest.x() + offsetx, dest.y() + offsety, dest.z()) );
|
||||
SetPoint(vec3(dest.x() - offsetx, dest.y() - offsety, dest.z()) );
|
||||
SetPoint(vec3(m_position.x() - offsetx, m_position.y() - offsety, dest.z()) );
|
||||
// update the system position :
|
||||
m_position = dest;
|
||||
}
|
||||
|
@ -21,21 +21,21 @@ namespace ewol
|
||||
class Drawing : public ewol::Compositing
|
||||
{
|
||||
private:
|
||||
vec3 m_position; //!< The current position to draw
|
||||
vec3 m_clippingPosStart; //!< Clipping start position
|
||||
vec3 m_clippingPosStop; //!< Clipping stop position
|
||||
bool m_clippingEnable; //!< true if the clipping must be activated
|
||||
vec3 m_position; //!< The current position to draw
|
||||
vec3 m_clippingPosStart; //!< Clipping start position
|
||||
vec3 m_clippingPosStop; //!< Clipping stop position
|
||||
bool m_clippingEnable; //!< true if the clipping must be activated
|
||||
private:
|
||||
draw::Color m_color; //!< The text foreground color
|
||||
draw::Color m_colorBg; //!< The text background color
|
||||
draw::Color m_color; //!< The text foreground color
|
||||
draw::Color m_colorBg; //!< The text background color
|
||||
private:
|
||||
ewol::Program* m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLColor; //!< openGL id on the element (color buffer)
|
||||
ewol::Program* m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLColor; //!< openGL id on the element (color buffer)
|
||||
private: // Background Color (display only when needed)
|
||||
etk::Vector<vec3 > m_coord; //!< internal position for the text display
|
||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the background
|
||||
etk::Vector<vec3 > m_coord; //!< internal position for the text display
|
||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the background
|
||||
public:
|
||||
/**
|
||||
* @brief Basic constructor
|
||||
@ -54,10 +54,10 @@ namespace ewol
|
||||
* @brief Un-Load the openGL program and get all the ID needed
|
||||
*/
|
||||
void UnLoadProgram(void);
|
||||
float m_thickness; //!< when drawing line and other things
|
||||
int32_t m_triElement; //!< special counter of the single dot generated
|
||||
vec3 m_triangle[3]; //!< Register every system with a combinaison of tiangle
|
||||
draw::Colorf m_tricolor[3]; //!< Register every the associated color foreground
|
||||
float m_thickness; //!< when drawing line and other things
|
||||
int32_t m_triElement; //!< special counter of the single dot generated
|
||||
vec3 m_triangle[3]; //!< Register every system with a combinaison of tiangle
|
||||
draw::Colorf m_tricolor[3]; //!< Register every the associated color foreground
|
||||
// internal API for the generation abstraction of triangles
|
||||
/**
|
||||
* @brief Lunch the generation of triangle
|
||||
|
@ -33,7 +33,7 @@ ewol::Colored3DObject::~Colored3DObject(void)
|
||||
|
||||
|
||||
void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
|
||||
draw::Colorf& color,
|
||||
const draw::Colorf& color,
|
||||
bool updateDepthBuffer)
|
||||
{
|
||||
if (vertices.Size()<=0) {
|
||||
@ -55,7 +55,7 @@ void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
|
||||
mat4 tmpMatrix = projMatrix * camMatrix;
|
||||
m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat);
|
||||
// position :
|
||||
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &vertices[0], 4);
|
||||
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z,unused*/, &vertices[0], 4*sizeof(float));
|
||||
// color :
|
||||
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color);
|
||||
// Request the draw od the elements :
|
||||
@ -71,7 +71,7 @@ void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
|
||||
}
|
||||
|
||||
void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
|
||||
draw::Colorf& color,
|
||||
const draw::Colorf& color,
|
||||
mat4& transformationMatrix)
|
||||
{
|
||||
if (vertices.Size()<=0) {
|
||||
@ -90,7 +90,7 @@ void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
|
||||
mat4 tmpMatrix = projMatrix * camMatrix * transformationMatrix;
|
||||
m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat);
|
||||
// position :
|
||||
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0]);
|
||||
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0], 4*sizeof(float));
|
||||
// color :
|
||||
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color);
|
||||
// Request the draw od the elements :
|
||||
@ -100,7 +100,7 @@ void ewol::Colored3DObject::Draw(etk::Vector<vec3>& vertices,
|
||||
}
|
||||
|
||||
void ewol::Colored3DObject::DrawLine(etk::Vector<vec3>& vertices,
|
||||
draw::Colorf& color,
|
||||
const draw::Colorf& color,
|
||||
mat4& transformationMatrix)
|
||||
{
|
||||
if (vertices.Size()<=0) {
|
||||
@ -119,7 +119,7 @@ void ewol::Colored3DObject::DrawLine(etk::Vector<vec3>& vertices,
|
||||
mat4 tmpMatrix = projMatrix * camMatrix * transformationMatrix;
|
||||
m_GLprogram->UniformMatrix4fv(m_GLMatrix, 1, tmpMatrix.m_mat);
|
||||
// position :
|
||||
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0]);
|
||||
m_GLprogram->SendAttribute(m_GLPosition, 3/*x,y,z*/, &vertices[0], 4*sizeof(float));
|
||||
// color :
|
||||
m_GLprogram->Uniform4fv(m_GLColor, 1/*r,g,b,a*/, (float*)&color);
|
||||
// Request the draw od the elements :
|
||||
|
@ -29,13 +29,13 @@ namespace ewol
|
||||
virtual ~Colored3DObject(void);
|
||||
virtual const char* GetType(void) { return "ewol::Colored3DObject"; };
|
||||
virtual void Draw(etk::Vector<vec3>& vertices,
|
||||
draw::Colorf& color,
|
||||
const draw::Colorf& color,
|
||||
bool updateDepthBuffer=true);
|
||||
virtual void Draw(etk::Vector<vec3>& vertices,
|
||||
draw::Colorf& color,
|
||||
const draw::Colorf& color,
|
||||
mat4& transformationMatrix);
|
||||
virtual void DrawLine(etk::Vector<vec3>& vertices,
|
||||
draw::Colorf& color,
|
||||
const draw::Colorf& color,
|
||||
mat4& transformationMatrix);
|
||||
|
||||
};
|
||||
|
@ -280,7 +280,8 @@ void widget::Button::OnRegenerateDisplay(void)
|
||||
bool widget::Button::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, vec2 pos)
|
||||
{
|
||||
bool previousHoverState = m_mouseHover;
|
||||
if(ewol::keyEvent::statusLeave == typeEvent) {
|
||||
if( ewol::keyEvent::statusLeave == typeEvent
|
||||
|| ewol::keyEvent::statusAbort == typeEvent) {
|
||||
m_mouseHover = false;
|
||||
m_buttonPressed = false;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user