diff --git a/stim/biomodels/cellset.h b/stim/biomodels/cellset.h index e922a0d..b7117f0 100644 --- a/stim/biomodels/cellset.h +++ b/stim/biomodels/cellset.h @@ -34,7 +34,7 @@ protected: void init_p3r(){ init_p3(); fields.insert(std::pair("radius", 3)); - ip[0] = 3; + ip[3] = 3; } public: /// Constructor - create an empty cell set diff --git a/stim/visualization/glObj.h b/stim/visualization/glObj.h index 91546a5..e0be584 100644 --- a/stim/visualization/glObj.h +++ b/stim/visualization/glObj.h @@ -43,12 +43,17 @@ private: } void - Create(GLenum mode) + Create(GLenum mode, bool blend = false) { // GLuint selectBuf[2048]; // GLint hits; // glSelectBuffer(2048, selectBuf); + if(blend) + { + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } int len = (int) stim::obj::numL(); std::vector< stim::vec > line; glNewList(dList, GL_COMPILE); @@ -72,6 +77,8 @@ private: } glEnd(); } + if(blend) + glDisable(GL_BLEND); glEndList(); CHECK_OPENGL_ERROR } @@ -83,11 +90,11 @@ public: } void - createFromSelf(GLenum mode = GL_RENDER) + createFromSelf(GLenum mode = GL_RENDER, bool blend = false) { // glPopMatrix(); init(); - Create(mode); + Create(mode, blend); // glPushMatrix(); } -- libgit2 0.21.4