aboutsummaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogl2/hellogl2.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/hellogl2/hellogl2.py')
-rw-r--r--examples/opengl/hellogl2/hellogl2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/opengl/hellogl2/hellogl2.py b/examples/opengl/hellogl2/hellogl2.py
index bad59cba3..a4ef3314e 100644
--- a/examples/opengl/hellogl2/hellogl2.py
+++ b/examples/opengl/hellogl2/hellogl2.py
@@ -121,11 +121,12 @@ class Window(QWidget):
else:
super(Window, self).keyPressEvent(event)
+
class Logo():
def __init__(self):
self.m_count = 0
self.i = 0
- self.m_data = numpy.empty(2500 * 6, dtype = ctypes.c_float)
+ self.m_data = numpy.empty(2500 * 6, dtype=ctypes.c_float)
x1 = +0.06
y1 = -0.14
@@ -223,6 +224,7 @@ class Logo():
self.i += 1
self.m_count += 6
+
class GLWidget(QOpenGLWidget, QOpenGLFunctions):
x_rotation_changed = Signal(int)
y_rotation_changed = Signal(int)
@@ -334,7 +336,6 @@ class GLWidget(QOpenGLWidget, QOpenGLFunctions):
fragColor = vec4(col, 1.0);
}"""
-
def vertex_shader_source(self):
return """attribute vec4 vertex;
attribute vec3 normal;
@@ -459,6 +460,7 @@ class GLWidget(QOpenGLWidget, QOpenGLFunctions):
self._last_pos = pos
+
if __name__ == '__main__':
app = QApplication(sys.argv)
parser = ArgumentParser(description="hellogl2", formatter_class=RawTextHelpFormatter)