Zadanie 2 update zadanie
This commit is contained in:
parent
75e04da1bf
commit
debc0097d6
@ -55,7 +55,7 @@ GLuint VAO, VBO;
|
||||
void initializeBalls() {
|
||||
srand(static_cast<unsigned>(time(0)));
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
for (int i = 0; i < ballsAmount; ++i) {
|
||||
float localAngle = angle + static_cast<float>(rand() % 60); // <angle, angle + 60>
|
||||
float localSpeed = speed + static_cast<float>(rand() % 5);
|
||||
|
||||
@ -186,7 +186,7 @@ void rungeKuttaStep(Ball &ball, float dt) {
|
||||
ball.y += ball.vy * dt;
|
||||
}
|
||||
|
||||
void setupSphereBuffers() {
|
||||
void setupSphereBuffer() {
|
||||
float radius = 0.5f;
|
||||
int slices = 20;
|
||||
int stacks = 20;
|
||||
@ -277,7 +277,7 @@ void update() {
|
||||
|
||||
void setupOpenGL() {
|
||||
compileShaders();
|
||||
setupSphereBuffers();
|
||||
setupSphereBuffer();
|
||||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
|
||||
|
Loading…
Reference in New Issue
Block a user