mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 01:36:20 +02:00
30 lines
No EOL
552 B
C++
30 lines
No EOL
552 B
C++
//
|
|
// Oscilloscope.cpp
|
|
// interface
|
|
//
|
|
// Created by Philip on 1/28/13.
|
|
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
|
|
#include "Oscilloscope.h"
|
|
|
|
Oscilloscope::Oscilloscope(int w,
|
|
int h) {
|
|
width = w;
|
|
height = h;
|
|
data = new float[width];
|
|
for (int i = 0; i < width; i++) {
|
|
data[i] = 0.0;
|
|
}
|
|
current_sample = 0;
|
|
}
|
|
|
|
void Oscilloscope::addData(float d) {
|
|
data[current_sample++] = d;
|
|
}
|
|
|
|
void Oscilloscope::render() {
|
|
glBegin(GL_LINES);
|
|
//glVertex2f(
|
|
glEnd();
|
|
} |