update
This commit is contained in:
parent
81578e5e8c
commit
3bfce1e098
@ -13,7 +13,7 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
const float POINT_SIZE = 32.0f;
|
const float POINT_SIZE = 32.0f;
|
||||||
const unsigned int F_PER_SECOND = 120;
|
const unsigned int F_PER_SECOND = 144;
|
||||||
const float PI = 3.141592653589793238462643383279502884L;
|
const float PI = 3.141592653589793238462643383279502884L;
|
||||||
|
|
||||||
typedef unsigned int u8;
|
typedef unsigned int u8;
|
||||||
@ -50,8 +50,15 @@ void render(){
|
|||||||
static int state = -1;
|
static int state = -1;
|
||||||
state=(state+1)%F_PER_SECOND;
|
state=(state+1)%F_PER_SECOND;
|
||||||
const float anglePerCircle = 10.0f;
|
const float anglePerCircle = 10.0f;
|
||||||
|
static float circleSize = 0.0f;
|
||||||
|
if(state==0){
|
||||||
|
circleSize+=0.1f;
|
||||||
|
}
|
||||||
|
if(circleSize>1.0f){
|
||||||
|
circleSize=0.0f;
|
||||||
|
}
|
||||||
for (u8 i=0;i<u8(float(state)/120.0f*360.0f);i+=anglePerCircle) {
|
for (u8 i=0;i<u8(float(state)/120.0f*360.0f);i+=anglePerCircle) {
|
||||||
glVertex3f(std::cos(angleToRad(i)),std::sin(angleToRad(i)),0.0f);
|
glVertex3f(std::cos(angleToRad(i))*circleSize,std::sin(angleToRad(i))*circleSize,0.0f);
|
||||||
}
|
}
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user