This commit is contained in:
Zengtudor 2024-09-01 18:46:36 +08:00
parent c6d3c704ec
commit 47f81f37a7
1 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,8 @@
#include <stdexcept> #include <stdexcept>
#include <thread> #include <thread>
const float POINT_SIZE = 32.0f;
void render(){ void render(){
glBegin(GL_TRIANGLES); glBegin(GL_TRIANGLES);
@ -29,6 +31,7 @@ void render(){
num=0.0f; num=0.0f;
speed=0.01f; speed=0.01f;
} }
glColor3f(num,num,num); glColor3f(num,num,num);
glVertex3f(0.0f,0.0f,0.0f); glVertex3f(0.0f,0.0f,0.0f);
@ -60,7 +63,7 @@ int main(){
glEnable(GL_POINT_SMOOTH); glEnable(GL_POINT_SMOOTH);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glPointSize(64.0f); glPointSize(POINT_SIZE);
while(glfwWindowShouldClose(window)==false){ while(glfwWindowShouldClose(window)==false){
render(); render();