first commit

This commit is contained in:
2025-12-18 09:26:50 +08:00
parent 02c1e325b9
commit b32406225f
70 changed files with 35435 additions and 0 deletions

27
qopengltest/glwidget.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "glwidget.h"
#include <GL/gl.h>
#include <QtWidgets/qopenglwidget.h>
GLWidget::GLWidget(QWidget* parent): QOpenGLWidget(parent) {}
GLWidget::~GLWidget() {
makeCurrent();
doneCurrent();
}
void GLWidget::initializeGL() {
initializeOpenGLFunctions();
glEnable(GL_DEPTH_TEST);
// TODO: 1.编译shader 2.创建VAO VBO 3.加载texture 4.加载model
}
void GLWidget::resizeGL(int w, int h) {
glViewport(0, 0, w, h);
}
void GLWidget::paintGL() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// TODO 1.绑定shader 2.设置uniform 3.draw calls
// 不要swapBuffers
}