tweaked some groovy color effects, updated screeny. I think I might have added fog in this one too?

This commit is contained in:
MitchellHansen
2016-11-29 23:44:03 -08:00
parent 259f6a8488
commit c98adefa3a
5 changed files with 31 additions and 19 deletions

View File

@@ -113,7 +113,7 @@ void GL_Testing::create_buffers() {
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), (GLvoid*)0);
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0); // Note that this is allowed, the call to glVertexAttribPointer registered VBO as the currently bound vertex buffer object so afterwards we can safely unbind
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
}

View File

@@ -3,7 +3,7 @@
Hardware_Caster::Hardware_Caster() {
}
@@ -36,6 +36,11 @@ int Hardware_Caster::init() {
return error;
}
srand(NULL);
int seed = rand();
create_buffer("seed", sizeof(int), &seed);
return 1;
}
@@ -80,6 +85,7 @@ void Hardware_Caster::validate()
set_kernel_arg("raycaster", 6, "lights");
set_kernel_arg("raycaster", 7, "light_count");
set_kernel_arg("raycaster", 8, "image");
set_kernel_arg("raycaster", 9, "seed");
print_kernel_arguments();
}

View File

@@ -73,7 +73,6 @@ int main() {
t.compile_shader("../shaders/passthrough.vert", GL_Testing::Shader_Type::VERTEX);
t.create_program();
t.create_buffers();
t.transform();
// Initialize the raycaster hardware, compat, or software
RayCaster *rc = new Hardware_Caster();
@@ -233,9 +232,9 @@ int main() {
window.popGLStates();
//glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
t.rotate(delta_time);
t.transform();
t.draw();
//t.rotate(delta_time);
//t.transform();
//t.draw();
//glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);