mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-03 06:24:49 -04:00
CubicVR2: more restricted operators on structures by removing convert-to-pointer. (Fix #550 ?)
This commit is contained in:
@@ -35,7 +35,7 @@ void ScopePanel::drawPanelContents() {
|
||||
bgPanel.draw();
|
||||
glLineWidth(1.0);
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
glLoadMatrixf(transform);
|
||||
glLoadMatrixf(transform.to_ptr());
|
||||
glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r * 0.35, ThemeMgr::mgr.currentTheme->scopeLine.g * 0.35,
|
||||
ThemeMgr::mgr.currentTheme->scopeLine.b * 0.35);
|
||||
glBegin (GL_LINES);
|
||||
@@ -52,7 +52,7 @@ void ScopePanel::drawPanelContents() {
|
||||
bgPanelStereo[1].draw();
|
||||
|
||||
glLineWidth(1.0);
|
||||
glLoadMatrixf(transform);
|
||||
glLoadMatrixf(transform.to_ptr());
|
||||
glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r, ThemeMgr::mgr.currentTheme->scopeLine.g, ThemeMgr::mgr.currentTheme->scopeLine.b);
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
glBegin (GL_LINES);
|
||||
@@ -76,7 +76,7 @@ void ScopePanel::drawPanelContents() {
|
||||
glLineWidth(1.0);
|
||||
glEnable(GL_POINT_SMOOTH);
|
||||
glPointSize(1.0);
|
||||
glLoadMatrixf(transform);
|
||||
glLoadMatrixf(transform.to_ptr());
|
||||
glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r * 0.15, ThemeMgr::mgr.currentTheme->scopeLine.g * 0.15,
|
||||
ThemeMgr::mgr.currentTheme->scopeLine.b * 0.15);
|
||||
}
|
||||
@@ -95,16 +95,16 @@ void ScopePanel::drawPanelContents() {
|
||||
glVertexPointer(2, GL_FLOAT, 0, &points[0]);
|
||||
glLineWidth(1.5);
|
||||
if (scopeMode == SCOPE_MODE_Y) {
|
||||
glLoadMatrixf(bgPanel.transform);
|
||||
glLoadMatrixf(bgPanel.transform.to_ptr());
|
||||
glDrawArrays(GL_LINE_STRIP, 0, points.size() / 2);
|
||||
} else if (scopeMode == SCOPE_MODE_2Y) {
|
||||
glLoadMatrixf(bgPanelStereo[0].transform);
|
||||
glLoadMatrixf(bgPanelStereo[0].transform.to_ptr());
|
||||
glDrawArrays(GL_LINE_STRIP, 0, points.size() / 4);
|
||||
|
||||
glLoadMatrixf(bgPanelStereo[1].transform);
|
||||
glLoadMatrixf(bgPanelStereo[1].transform.to_ptr());
|
||||
glDrawArrays(GL_LINE_STRIP, points.size() / 4, points.size() / 4);
|
||||
} else if (scopeMode == SCOPE_MODE_XY) {
|
||||
glLoadMatrixf(bgPanel.transform);
|
||||
glLoadMatrixf(bgPanel.transform.to_ptr());
|
||||
glDrawArrays(GL_POINTS, 0, points.size() / 2);
|
||||
}
|
||||
glLineWidth(1.0);
|
||||
|
||||
@@ -113,7 +113,7 @@ void SpectrumPanel::drawPanelContents() {
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
|
||||
|
||||
glLoadMatrixf(transform * (CubicVR::mat4::translate(-1.0f, -0.75f, 0.0f) * CubicVR::mat4::scale(2.0f, 1.5f, 1.0f)));
|
||||
glLoadMatrixf((transform * (CubicVR::mat4::translate(-1.0f, -0.75f, 0.0f) * CubicVR::mat4::scale(2.0f, 1.5f, 1.0f))).to_ptr());
|
||||
|
||||
if (points.size()) {
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
@@ -166,7 +166,7 @@ void SpectrumPanel::drawPanelContents() {
|
||||
|
||||
float viewHeight = (float) vp[3];
|
||||
float viewWidth = (float) vp[2];
|
||||
glLoadMatrixf(transform);
|
||||
glLoadMatrixf(transform.to_ptr());
|
||||
|
||||
|
||||
long long leftFreq = (double) freq - ((double) bandwidth / 2.0);
|
||||
|
||||
@@ -165,7 +165,7 @@ void WaterfallPanel::drawPanelContents() {
|
||||
|
||||
int half_fft_size = fft_size / 2;
|
||||
|
||||
glLoadMatrixf(transform);
|
||||
glLoadMatrixf(transform.to_ptr());
|
||||
|
||||
glEnable (GL_TEXTURE_2D);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
|
||||
|
||||
+2
-2
@@ -308,7 +308,7 @@ void GLPanel::calcTransform(mat4 transform_in) {
|
||||
void GLPanel::draw() {
|
||||
float min = -1.0, max = 1.0;
|
||||
|
||||
glLoadMatrixf(transform);
|
||||
glLoadMatrixf(transform.to_ptr());
|
||||
|
||||
if (fillType != GLPANEL_FILL_NONE && visible) {
|
||||
glEnable(GL_BLEND);
|
||||
@@ -378,7 +378,7 @@ void GLPanel::draw() {
|
||||
}
|
||||
// if (coord == GLPANEL_Y_UP) {
|
||||
// }
|
||||
glLoadMatrixf(transform * mCoord);
|
||||
glLoadMatrixf((transform * mCoord).to_ptr());
|
||||
drawPanelContents();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glLoadMatrixf(CubicVR::mat4::perspective(45.0, 1.0, 1.0, 1000.0));
|
||||
glLoadMatrixf(CubicVR::mat4::perspective(45.0, 1.0, 1.0, 1000.0).to_ptr());
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
@@ -210,7 +210,7 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
spectrumPanel.drawChildren();
|
||||
}
|
||||
|
||||
glLoadMatrixf(scopePanel.transform);
|
||||
glLoadMatrixf(scopePanel.transform.to_ptr());
|
||||
if (!deviceName.empty()) {
|
||||
glContext->DrawDeviceName(deviceName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user