Fixed cmake compilation.

This commit is contained in:
Daria Volvenkova 2017-05-19 16:58:47 +03:00
parent cd7573e2ab
commit 8231ccc260
4 changed files with 49 additions and 5 deletions

View file

@ -256,6 +256,41 @@ void GLFunctions::glLineWidth(uint32_t value)
return MOCK_CALL(glLineWidth(value));
}
void GLFunctions::glViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
{
return MOCK_CALL(glViewport(x, y, w, h));
}
void GLFunctions::glScissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
{
return MOCK_CALL(glScissor(x, y, w, h));
}
void GLFunctions::glGenFramebuffer(uint32_t * fbo)
{
return MOCK_CALL(glGenFramebuffer(fbo));
}
void GLFunctions::glBindFramebuffer(uint32_t fbo)
{
return MOCK_CALL(glBindFramebuffer(fbo));
}
void GLFunctions::glDeleteFramebuffer(uint32_t * fbo)
{
return MOCK_CALL(glDeleteFramebuffer(fbo));
}
void GLFunctions::glFramebufferTexture2D(glConst attachment, glConst texture)
{
return MOCK_CALL(glFramebufferTexture2D(attachment, texture));
}
uint32_t GLFunctions::glCheckFramebufferStatus()
{
return MOCK_CALL(glCheckFramebufferStatus());
}
void CheckGLError(my::SrcPoint const & /*srcPt*/) {}
void GLFunctions::glEnable(glConst mode) {}

View file

@ -16,7 +16,7 @@ public:
static GLMockFunctions & Instance();
static void ValidateAndClear();
//VAO
// VAO
MOCK_METHOD0(glGenVertexArray, uint32_t());
MOCK_METHOD1(glBindVertexArray, void(uint32_t vao));
MOCK_METHOD1(glDeleteVertexArray, void(uint32_t vao));
@ -71,7 +71,7 @@ public:
int32_t*, glConst *,
string &));
//Texture functions
// Texture functions
MOCK_METHOD1(glActiveTexture, void(glConst));
MOCK_METHOD0(glGenTexture, uint32_t());
MOCK_METHOD1(glDeleteTexture, void(uint32_t));
@ -85,6 +85,15 @@ public:
MOCK_METHOD0(glGetMaxLineWidth, int32_t());
MOCK_METHOD1(glLineWidth, void(uint32_t value));
MOCK_METHOD4(glViewport, void(uint32_t x, uint32_t y, uint32_t w, uint32_t h));
MOCK_METHOD4(glScissor, void(uint32_t x, uint32_t y, uint32_t w, uint32_t h));
// FBO
MOCK_METHOD1(glGenFramebuffer, void(uint32_t * fbo));
MOCK_METHOD1(glBindFramebuffer, void(uint32_t fbo));
MOCK_METHOD1(glDeleteFramebuffer, void(uint32_t * fbo));
MOCK_METHOD2(glFramebufferTexture2D, void(glConst attachment, glConst texture));
MOCK_METHOD0(glCheckFramebufferStatus, uint32_t());
private:
static GLMockFunctions * m_mock;

View file

@ -14,8 +14,8 @@
#include <QtGui/QOpenGLShaderProgram>
#include <QtWidgets/QAction>
#include <QOpenGLBuffer>
#include <QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLBuffer>
#include <QtGui/QOpenGLVertexArrayObject>
namespace qt
{

View file

@ -250,7 +250,7 @@ void MainView::InitMapWidget()
widget->setLayout(layout);
{
auto * mapWidget = new qt::common::MapWidget(m_framework, widget /* parent */);
auto * mapWidget = new qt::common::MapWidget(m_framework, false /* apiOpenGLES3 */, widget /* parent */);
auto * toolBar = new QToolBar(widget /* parent */);
toolBar->setOrientation(Qt::Vertical);
toolBar->setIconSize(QSize(32, 32));