Commit e69a42dbdfd3f1ab24ac731fdad5385966814957

Authored by David Mayerich
2 parents eae75592 18cb8a07

Merge branch 'master' of git.stim.ee.uh.edu:codebase/stimlib

Showing 2 changed files with 11 additions and 4 deletions   Show diff stats
stim/biomodels/cellset.h
... ... @@ -34,7 +34,7 @@ protected:
34 34 void init_p3r(){
35 35 init_p3();
36 36 fields.insert(std::pair<std::string, size_t>("radius", 3));
37   - ip[0] = 3;
  37 + ip[3] = 3;
38 38 }
39 39 public:
40 40 /// Constructor - create an empty cell set
... ...
stim/visualization/glObj.h
... ... @@ -43,12 +43,17 @@ private:
43 43 }
44 44  
45 45 void
46   - Create(GLenum mode)
  46 + Create(GLenum mode, bool blend = false)
47 47 {
48 48 // GLuint selectBuf[2048];
49 49 // GLint hits;
50 50 // glSelectBuffer(2048, selectBuf);
51 51  
  52 + if(blend)
  53 + {
  54 + glEnable(GL_BLEND);
  55 + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  56 + }
52 57 int len = (int) stim::obj<T>::numL();
53 58 std::vector< stim::vec<float> > line;
54 59 glNewList(dList, GL_COMPILE);
... ... @@ -72,6 +77,8 @@ private:
72 77 }
73 78 glEnd();
74 79 }
  80 + if(blend)
  81 + glDisable(GL_BLEND);
75 82 glEndList();
76 83 CHECK_OPENGL_ERROR
77 84 }
... ... @@ -83,11 +90,11 @@ public:
83 90 }
84 91  
85 92 void
86   - createFromSelf(GLenum mode = GL_RENDER)
  93 + createFromSelf(GLenum mode = GL_RENDER, bool blend = false)
87 94 {
88 95 // glPopMatrix();
89 96 init();
90   - Create(mode);
  97 + Create(mode, blend);
91 98 // glPushMatrix();
92 99 }
93 100  
... ...