oglc/src/sphere.h

22 lines
443 B
C
Raw Normal View History

2021-08-06 20:25:52 +02:00
#pragma once
#include <stdio.h>
#define GLEW_STATIC
#include <GL/glew.h>
#include <cglm/vec3.h>
2021-08-08 17:47:25 +02:00
#include "clock.h"
2021-08-07 04:44:08 +02:00
2021-08-06 20:25:52 +02:00
struct Sphere
{
vec4 cr;
vec3 albedo;
};
2021-08-07 04:44:08 +02:00
void makeSpheres(struct Sphere *spheres, int count);
2021-08-06 20:25:52 +02:00
struct Sphere makeSphere(vec3 center, float radius, vec3 albedo);
void updateSphereUniform(GLuint shaderProgram, struct Sphere sphere);
void updateSphereUniforms(GLuint shaderProgram, struct Sphere *spheres, int count);