Commit 917a9c5a authored by Thery Sylvain's avatar Thery Sylvain

remove dependancies

parent 66f66943
......@@ -23,6 +23,7 @@
*******************************************************************************/
#include "clipping.h"
#include "Utils/vbo.h"
#include "Utils/static_assert.h"
/*******************************************************************************
......
......@@ -35,6 +35,7 @@
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/vbo.h"
#include <glm/gtc/type_ptr.hpp>
......
......@@ -40,6 +40,7 @@
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/vbo.h"
#include <vector>
......
......@@ -38,6 +38,7 @@
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/vbo.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/MC/marchingcube.h"
......
......@@ -25,6 +25,7 @@
#include "texturesExample.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/polyhedron.h"
#include "Utils/vbo.h"
TexView::TexView():
m_render(NULL),
......
......@@ -46,7 +46,7 @@
#include "Utils/Shaders/shaderVectorPerVertex.h"
#include "Utils/pointSprite.h"
#include "Utils/text3d.h"
#include "Utils/vboRender.h"
#include "Utils/vbo.h"
#include "Utils/Qt/qtInputs.h"
......
......@@ -41,6 +41,7 @@
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/vbo.h"
using namespace CGoGN ;
......
......@@ -45,7 +45,7 @@
#include "Topology/generic/cellmarker.h"
#include "Utils/text3d.h"
#include "Utils/vbo.h"
#include "Utils/pointSprite.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderVectorPerVertex.h"
......
......@@ -35,7 +35,7 @@
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/vbo.h"
#include "Algo/Histogram/histogram.h"
#include "Utils/Qt/qthistodraw.h"
......
......@@ -37,6 +37,7 @@
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderVectorPerVertex.h"
#include "Utils/vbo.h"
#include "Utils/cgognStream.h"
#include "Utils/Qt/qtSimple.h"
......
......@@ -33,7 +33,7 @@
#include "Topology/generic/cellmarker.h"
#include "Geometry/vector_gen.h"
#include "Utils/colorMaps.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
namespace CGoGN
......
......@@ -29,7 +29,7 @@
#include "Topology/generic/dart.h"
#include "Topology/generic/attributeHandler.h"
#include "Topology/generic/functor.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/GLSLShader.h"
......
......@@ -31,7 +31,7 @@
#include "Topology/generic/dart.h"
#include "Topology/generic/attributeHandler.h"
#include "Topology/generic/functor.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/Shaders/shaderExplodeVolumes.h"
#include "Utils/Shaders/shaderExplodeVolumesLines.h"
......
......@@ -33,13 +33,13 @@
#include <set>
#include <utility>
#include "Utils/gl_def.h"
#include "Topology/generic/dart.h"
#include "Topology/generic/functor.h"
#include "Topology/generic/attributeHandler.h"
#include "Container/convert.h"
#include "Geometry/vector_gen.h"
#include "Utils/vbo.h"
// forward definition
namespace CGoGN { namespace Utils { class GLSLShader; } }
......
......@@ -27,7 +27,7 @@
#include "Topology/generic/cellmarker.h"
#include "Topology/generic/traversorCell.h"
#include "Utils/vbo.h"
//#include "Utils/vbo.h"
#include "Geometry/intersection.h"
#include "Algo/Geometry/normal.h"
......
......@@ -33,7 +33,7 @@
#include "Topology/generic/functor.h"
#include "Geometry/vector_gen.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/svg.h"
// forward
......
......@@ -33,7 +33,7 @@
#include "Topology/generic/functor.h"
#include "Geometry/vector_gen.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/svg.h"
// forward
......
......@@ -31,8 +31,9 @@
#include "Utils/gl_def.h"
#include "Utils/os_spec.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/gl_matrices.h"
#include "Utils/cgognStream.h"
#include "glm/glm.hpp"
#include <GL/glew.h>
......
......@@ -26,7 +26,7 @@
#ifndef __FRAMEMANIPULATOR_H_
#define __FRAMEMANIPULATOR_H_
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "glm/glm.hpp"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/pickables.h"
......
......@@ -26,7 +26,7 @@
#ifndef __PICKABLES_H_
#define __PICKABLES_H_
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "glm/glm.hpp"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/Shaders/shaderSimpleColor.h"
......
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __CGoGN_GLSL_VBO__
#define __CGoGN_GLSL_VBO__
#include <vector>
#include "Utils/gl_def.h"
#include "Topology/generic/attributeHandler.h"
#include "Container/convert.h"
namespace CGoGN
{
namespace Utils
{
class GLSLShader;
/**
* Encapsulation of OpenGL Vertex Buffer Object
* Manage
* - alloc /release of GL buffer
* - ref by Shaders
* - size of data (invidual cells)
*/
class VBO
{
protected:
// VBO id
CGoGNGLuint m_id;
// size of data (in floats)
unsigned int m_data_size;
// shaders that ref this vbo
std::vector<GLSLShader*> m_refs;
unsigned int m_nbElts;
mutable bool m_lock;
public:
/**
* constructor: allocate the OGL VBO
*/
VBO();
/**
* copy constructor, new VBO copy content
*/
VBO(const VBO& vbo);
/**
* destructor: release the OGL VBO and clean references between VBO/Shaders
*/
~VBO();
/**
* get id of vbo
*/
GLuint id() const { return *m_id; }
/**
* get dataSize
*/
unsigned int dataSize() const { return m_data_size; }
/**
* set the data size (in number of float)
*/
void setDataSize(unsigned int ds) { m_data_size = ds; }
/**
* get nb element in vbo (vertices, colors ...)
*/
unsigned int nbElts() { return m_nbElts; }
/**
* bind array vbo
*/
void bind() const { glBindBuffer(GL_ARRAY_BUFFER, *m_id); }
/**
* alloc buffer of same size than parameter
*/
void sameAllocSameBufferSize(const VBO& vbo);
/**
* update data from attribute handler to the vbo
*/
template <typename ATTR_HANDLER>
void updateData(const ATTR_HANDLER& attrib);
/**
* update data from attribute handler to the vbo, with conversion
*/
template <typename ATTR_HANDLER>
void updateData(const ATTR_HANDLER& attrib, ConvertAttrib* conv);
/**
* update data from given data vector
*/
template <typename T>
void updateData(std::vector<T>& data);
void* lockPtr();
const void* lockPtr() const;
void releasePtr() const;
void copyData(void *ptr) const;
void allocate(unsigned int nbElts);
};
} // namespace Utils
} // namespace CGoGN
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __CGoGN_VBO__
#define __CGoGN_VBO__
#include "Utils/vbo_base.h"
#include "Utils/vbo.hpp"
#endif
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __CGoGN_GLSL_VBO__
#define __CGoGN_GLSL_VBO__
#include <vector>
#include "Utils/gl_def.h"
#include "Container/convert.h"
namespace CGoGN
{
namespace Utils
{
class GLSLShader;
/**
* Encapsulation of OpenGL Vertex Buffer Object
* Manage
* - alloc /release of GL buffer
* - ref by Shaders
* - size of data (invidual cells)
*/
class VBO
{
protected:
// VBO id
CGoGNGLuint m_id;
// size of data (in floats)
unsigned int m_data_size;
// shaders that ref this vbo
std::vector<GLSLShader*> m_refs;
unsigned int m_nbElts;
mutable bool m_lock;
public:
/**
* constructor: allocate the OGL VBO
*/
VBO();
/**
* copy constructor, new VBO copy content
*/
VBO(const VBO& vbo);
/**
* destructor: release the OGL VBO and clean references between VBO/Shaders
*/
~VBO();
/**
* get id of vbo
*/
GLuint id() const { return *m_id; }
/**
* get dataSize
*/
unsigned int dataSize() const { return m_data_size; }
/**
* set the data size (in number of float)
*/
void setDataSize(unsigned int ds) { m_data_size = ds; }
/**
* get nb element in vbo (vertices, colors ...)
*/
unsigned int nbElts() { return m_nbElts; }
/**
* bind array vbo
*/
void bind() const { glBindBuffer(GL_ARRAY_BUFFER, *m_id); }
/**
* alloc buffer of same size than parameter
*/
void sameAllocSameBufferSize(const VBO& vbo);
/**
* update data from attribute handler to the vbo
* @warning use only with include vbo.h (not vbo_base.h)
*/
template <typename ATTR_HANDLER>
void updateData(const ATTR_HANDLER& attrib);
/**
* update data from attribute handler to the vbo, with conversion
* @warning use only with include vbo.h (not vbo_base.h)
*/
template <typename ATTR_HANDLER>
void updateData(const ATTR_HANDLER& attrib, ConvertAttrib* conv);
/**
* update data from given data vector
* @warning use only with include vbo.h (not vbo_base.h)
*/
template <typename T>
void updateData(std::vector<T>& data);
void* lockPtr();
const void* lockPtr() const;
void releasePtr() const;
void copyData(void *ptr) const;
void allocate(unsigned int nbElts);
};
} // namespace Utils
} // namespace CGoGN
#endif
......@@ -26,7 +26,7 @@
#include "Utils/drawer.h"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/svg.h"
namespace CGoGN
......
......@@ -23,8 +23,9 @@
*******************************************************************************/
#include "Utils/text3d.h"
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/svg.h"
#include "Utils/gzstream.h"
namespace CGoGN
{
......
......@@ -22,7 +22,7 @@
* *
*******************************************************************************/
#include "Utils/vbo.h"
#include "Utils/vbo_base.h"
#include "Utils/GLSLShader.h"
#include <stdio.h>
#include <string.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment