Software raycasting now works, but has some major problems / is extremely

slow. Perhaps it will only be useful in debugging the kernel via emulation
This commit is contained in:
MitchellHansen
2016-11-04 23:11:24 -07:00
parent b2988f0e13
commit 8c1f18ac70
8 changed files with 258 additions and 198 deletions

View File

@@ -170,11 +170,13 @@ void Hardware_Caster::create_viewport(int width, int height, float v_fov, float
void Hardware_Caster::assign_lights(std::vector<Light> lights) {
std::cout << sizeof(Light);
this->lights = std::vector<Light>(lights);
int light_count = lights.size();
light_count = lights.size();
create_buffer("lights", sizeof(float) * 12 * light_count, lights.data(), CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR);
create_buffer("lights", sizeof(float) * 10 * light_count, this->lights.data(), CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR);
create_buffer("light_count", sizeof(int), &light_count);