gl_position is vec4, cleanup/tests

This commit is contained in:
Jonathan Bosson
2017-06-09 17:48:07 -06:00
parent 23f524d141
commit 5ef64aa513
3 changed files with 3 additions and 8 deletions

View File

@@ -77,7 +77,6 @@ class TouchMarker : public properties::PropertyOwner
GLuint _vertexPositionBuffer;
int _numFingers;
bool _listIsDirty;
bool _textureIsDirty;
};

View File

@@ -39,5 +39,5 @@ void main() {
//pointRadius = 0.05; //radius;
gl_PointSize = 0.05; //radius;
gl_Position = vec3(in_position, -1.0, 1.0);
gl_Position = vec4(in_position, -1.0, 1.0);
}

View File

@@ -46,7 +46,6 @@ TouchMarker::TouchMarker()
, _texturePath("texturePath", "Color Texture")
, _shader(nullptr)
, _texture(nullptr)
, _listIsDirty(false)
, _textureIsDirty(false)
, _numFingers(0)
{
@@ -116,9 +115,6 @@ void TouchMarker::update() {
if (_shader->isDirty())
_shader->rebuildFromFile();
if (_listIsDirty)
//createFingerList();
if (_textureIsDirty) {
loadTexture();
_textureIsDirty = false;
@@ -147,7 +143,7 @@ void TouchMarker::loadTexture() {
void TouchMarker::createVertexList(const std::vector<TUIO::TuioCursor> list) {
_numFingers = list.size();
std::vector<GLfloat> vertexData(_numFingers * 2, 0);
std::vector<GLfloat> vertexData(_numFingers * 2, 0.0f);
int i = 0;
for (const TUIO::TuioCursor& c : list) {
vertexData.at(i) = 2 * (c.getX() - 0.5);
@@ -164,7 +160,7 @@ void TouchMarker::createVertexList(const std::vector<TUIO::TuioCursor> list) {
2,
GL_FLOAT,
GL_FALSE,
0,
sizeof(GLfloat) * 2,
reinterpret_cast<void*>(0)
);
}