Commit f34e2ad9 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'master' into splatcloud_rendering

parent 13087275
This diff is collapsed.
......@@ -75,6 +75,7 @@
#include <ACG/GL/gl.hh>
#include <ACG/GL/VertexDeclaration.hh>
//== NAMESPACES ==================================================
......@@ -126,6 +127,9 @@ public:
/// draw the SplatCloud
void draw( GLState &_state, const DrawModes::DrawMode &_drawMode );
/// create render objects
void getRenderObjects( IRenderer* _renderer, GLState& _state, const DrawModes::DrawMode& _drawMode, const Material* _mat );
/// picking
void pick( GLState &_state, PickTarget _target );
......@@ -174,6 +178,12 @@ public:
inline const Viewlist &getViewlist ( int _idx ) const { return splatCloud_.hasViewlists() ? splatCloud_.viewlists ( _idx ) : DEFAULT_VIEWLIST; }
inline const Selection &getSelection( int _idx ) const { return splatCloud_.hasSelections() ? splatCloud_.selections( _idx ) : DEFAULT_SELECTION; }
// ---- render object params ----
inline void setPointsizeScale(float _scale) { pointsizeScale_ = _scale; }
inline void setBackfaceCulling(bool _enable) { backfaceCulling_ = _enable; }
//----------------------------------------------------------------
private:
......@@ -229,6 +239,7 @@ private:
GLuint vboGlId_;
unsigned int vboNumSplats_;
unsigned char *vboData_;
unsigned int vboStride_;
/// offsets relative to vboData_ or -1 if *not* present in VBO
int vboPositionsOffset_;
......@@ -238,6 +249,8 @@ private:
int vboSelectionsOffset_;
int vboPickColorsOffset_;
ACG::VertexDeclaration vboDecl_;
/// returns true iff the internal block structure of the VBO has to be changed
inline bool vboStructureModified() const
{
......@@ -264,6 +277,11 @@ private:
static const Index DEFAULT_INDEX;
static const Viewlist DEFAULT_VIEWLIST;
static const Selection DEFAULT_SELECTION;
// ---- rendering params ----
float pointsizeScale_;
bool backfaceCulling_;
};
......
......@@ -267,6 +267,8 @@ void SplatCloudObject::reloadShaders()
*/
void SplatCloudObject::enableBackfaceCulling( bool _enable )
{
splatCloudNode_->setBackfaceCulling(_enable);
// get drawmodes
ACG::SceneGraph::DrawModes::DrawMode splatsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Splats" );
ACG::SceneGraph::DrawModes::DrawMode dotsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Dots" );
......@@ -346,6 +348,8 @@ void SplatCloudObject::enableBackfaceCulling( bool _enable )
*/
void SplatCloudObject::setPointsizeScale( float _scale )
{
splatCloudNode_->setPointsizeScale(_scale);
// get drawmodes
ACG::SceneGraph::DrawModes::DrawMode splatsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Splats" );
ACG::SceneGraph::DrawModes::DrawMode dotsDrawMode = ACG::SceneGraph::DrawModes::getDrawMode( "Dots" );
......
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