Color map finally works!
This commit is contained in:
2
ogl.cpp
2
ogl.cpp
@@ -69,6 +69,8 @@ namespace ogl
|
|||||||
glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, tex.width, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
|
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_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, 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);
|
png_close_file(&tex);
|
||||||
delete data;
|
delete data;
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#define MAP_POS(X, Y) (data[((X) * m_height) + (Y)])
|
#define MAP_POS(X, Y) (data[((X) * m_height) + (Y)])
|
||||||
|
|
||||||
static const unsigned int MAX_ITERS = 1000;
|
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 MAX_PHERO_INTENSITY = 250;
|
||||||
const unsigned char MIN_PHERO_INTENSITY = 0;
|
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