mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
gl_position is vec4, cleanup/tests
This commit is contained in:
@@ -77,7 +77,6 @@ class TouchMarker : public properties::PropertyOwner
|
||||
GLuint _vertexPositionBuffer;
|
||||
int _numFingers;
|
||||
|
||||
bool _listIsDirty;
|
||||
bool _textureIsDirty;
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user