The GLWidget class This is the main class containing the OpenGL context All interaction with OpenGL happens here.
More...
#include <glwidget.h>
|
enum | RenderMode { NONE,
LINES,
POINTS
} |
| RenderMode enum currently only LINES is supported.
|
|
|
void | usedGPUMemoryChanged (float size) |
|
void | totalGPUMemoryChanged (float size) |
|
void | fpsChanged (int fps) |
|
void | graphicsDeviceInfoChanged (QString string) |
|
|
void | paintGL () Q_DECL_OVERRIDE |
|
void | initializeGL () Q_DECL_OVERRIDE |
|
void | resizeGL (int w, int h) Q_DECL_OVERRIDE |
|
|
void | mousePressEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
|
void | mouseMoveEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
|
void | keyPressEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
|
void | keyReleaseEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
|
void | wheelEvent (QWheelEvent *event) Q_DECL_OVERRIDE |
|
|
void | initShaders () |
|
void | allocateGPUBufferLineData () |
|
void | drawLines () |
|
void | calculateFPS () |
|
void | printDebugMsg (const QOpenGLDebugMessage &msg) |
|
|
Camera | camera |
|
std::vector< std::vector< LineVertex > > * | lines |
|
size_t | nrLines |
|
QOpenGLShaderProgram * | shaderLinesWithHalos |
|
QOpenGLVertexArrayObject | vaoLines |
|
QOpenGLBuffer | vboLines |
|
QPoint | lastMousePos |
|
size_t | frameCount = 0 |
|
size_t | fps = 0 |
|
qint64 | previousTimeFPS |
|
QElapsedTimer | fpsTimer |
|
bool | GL_NVX_gpu_memory_info_supported = false |
|
GLint | total_mem_kb = 0 |
|
GLint | cur_avail_mem_kb = 0 |
|
QTimer | paintTimer |
|
QOpenGLDebugLogger * | logger |
|
MainWindow * | mainWindow |
|
|
class | MainWindow |
| make friend since tightly coupled anyway
|
|
The GLWidget class This is the main class containing the OpenGL context All interaction with OpenGL happens here.
◆ getImage()
QImage GLWidget::getImage |
( |
| ) |
|
|
inline |
getImage
- Returns
- an image snapshot of the current OpenGL framebuffer
◆ initLineRenderMode()
void GLWidget::initLineRenderMode |
( |
std::vector< std::vector< LineVertex > > * |
lines | ) |
|
set up OpenGL buffers and shaders to render lines
- Parameters
-
lines | vector of lines (vector of vector of line vertices) each vertex has 8 floats: 3 pos, 3 direction to next, 2 uv for triangle strip texturing we store all three attributes interleaved on single vbo [<posdirectionuv><posdirectionuv>...] NOTE: we store two sequential copies of each vertex (one with v = 0, one with v = 1) to draw lines as triangle strips |
◆ lines
std::vector<std::vector<LineVertex> >* GLWidget::lines |
|
private |
CPU line vertex data each line vertex has 8 floats: 3 pos, 3 direction to next, 2 uv for triangle strip texturing NOTE: we store two sequential copies of each vertex (one with v = 0, one with v = 1) to draw lines as triangle strips
The documentation for this class was generated from the following files: