Color map finally works!
This commit is contained in:
4
ogl.cpp
4
ogl.cpp
@@ -69,11 +69,13 @@ namespace ogl
|
||||
glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, tex.width, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
png_close_file(&tex);
|
||||
delete data;
|
||||
}
|
||||
|
||||
|
||||
void initialize(PheromoneMap * phero_map) {
|
||||
glEnable(GL_TEXTURE_1D);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#define MAP_POS(X, Y) (data[((X) * m_height) + (Y)])
|
||||
|
||||
static const unsigned int MAX_ITERS = 1000;
|
||||
static const float EVAPORATION_RATE = 0.1f;
|
||||
static const float EVAPORATION_RATE = 0.05f;
|
||||
const unsigned char MAX_PHERO_INTENSITY = 250;
|
||||
const unsigned char MIN_PHERO_INTENSITY = 0;
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 328 B |
Reference in New Issue
Block a user