oglc/src/sphere.h

23 lines
486 B
C
Raw Normal View History

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