Browse Source

Update DPF

tags/1.9.7
falkTX 8 years ago
parent
commit
e6d94a23f0
5 changed files with 12 additions and 11 deletions
  1. +1
    -1
      source/modules/dgl/Application.hpp
  2. +2
    -2
      source/modules/dgl/ImageWidgets.hpp
  3. +2
    -2
      source/modules/dgl/src/Geometry.cpp
  4. +6
    -5
      source/modules/dgl/src/WidgetPrivateData.hpp
  5. +1
    -1
      source/modules/distrho/DistrhoUtils.hpp

+ 1
- 1
source/modules/dgl/Application.hpp View File

@@ -49,7 +49,7 @@ public:
/**
Destructor.
*/
~Application();
virtual ~Application();

/**
Idle function.


+ 2
- 2
source/modules/dgl/ImageWidgets.hpp View File

@@ -79,7 +79,7 @@ private:
struct PrivateData;
PrivateData* const pData;

DISTRHO_LEAK_DETECTOR(ImageButton)
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageButton)
};

// -----------------------------------------------------------------------
@@ -225,7 +225,7 @@ private:
void setAbsolutePos(int, int) const noexcept {}
void setAbsolutePos(const Point<int>&) const noexcept {}

DISTRHO_LEAK_DETECTOR(ImageSlider)
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageSlider)
};

// -----------------------------------------------------------------------


+ 2
- 2
source/modules/dgl/src/Geometry.cpp View File

@@ -655,13 +655,13 @@ void Circle<T>::_draw(const bool outline)
{
DISTRHO_SAFE_ASSERT_RETURN(fNumSegments >= 3 && fSize > 0.0f,);

float t, x = fSize, y = 0.0f;
double t, x = fSize, y = 0.0;

glBegin(outline ? GL_LINE_LOOP : GL_POLYGON);

for (uint i=0; i<fNumSegments; ++i)
{
glVertex2f(x + fPos.fX, y + fPos.fY);
glVertex2d(x + fPos.fX, y + fPos.fY);

t = x;
x = fCos * x - fSin * y;


+ 6
- 5
source/modules/dgl/src/WidgetPrivateData.hpp View File

@@ -44,6 +44,7 @@ struct Widget::PrivateData {
parent(p),
absolutePos(0, 0),
size(0, 0),
subWidgets(),
id(0),
needsFullViewport(false),
needsScaling(false),
@@ -81,7 +82,7 @@ struct Widget::PrivateData {
{
// limit viewport to widget bounds
glViewport(absolutePos.getX(),
height - static_cast<int>(self->getHeight()) - absolutePos.getY(),
static_cast<int>(height - self->getHeight()) - absolutePos.getY(),
static_cast<GLsizei>(self->getWidth()),
static_cast<GLsizei>(self->getHeight()));
}
@@ -89,13 +90,13 @@ struct Widget::PrivateData {
{
// only set viewport pos
glViewport(absolutePos.getX(),
/*height - static_cast<int>(self->getHeight())*/ - absolutePos.getY(),
static_cast<GLsizei>(width),
static_cast<GLsizei>(height));
/*static_cast<int>(height - self->getHeight())*/ - absolutePos.getY(),
static_cast<GLsizei>(width),
static_cast<GLsizei>(height));

// then cut the outer bounds
glScissor(absolutePos.getX(),
height - static_cast<int>(self->getHeight()) - absolutePos.getY(),
static_cast<int>(height - self->getHeight()) - absolutePos.getY(),
static_cast<GLsizei>(self->getWidth()),
static_cast<GLsizei>(self->getHeight()));



+ 1
- 1
source/modules/distrho/DistrhoUtils.hpp View File

@@ -68,7 +68,7 @@ int64_t d_cconst(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_
static inline
uint32_t d_version(const uint8_t major, const uint8_t minor, const uint8_t micro) noexcept
{
return (major << 16) | (minor << 8) | (micro << 0);
return uint32_t(major << 16) | uint32_t(minor << 8) | (micro << 0);
}

/*


Loading…
Cancel
Save