migueltk's picture

The best demo I've seen and with source code

Hi, ...
I want to share with all of this demo, GLSLDemo awesome! and also the author provides the source code. It uses OpenGL, I have not compiled the project but hope to soon.
Adapt this project to OpenTK would be a good showcase of the possibilities of OpenTK.

Ah! and do not forget to put the 3D glasses.

P.D: How I can insert a frame of video in this post?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Toanso's picture

when i debug the source code , at line 65 in SceneTerrian.cpp,

m_pTerrain->Load("test_heightmap512_2.jpg", box, 16)

failed ,

When i look into it, i find in Terrain.cpp line 59

GLubyte* data = ImageTools::OpenImage(heightmap, m_nHMWidth, m_nHMHeight, d);

failed,

then it will call a assert~
assert(data!=NULL);

and in the openImage function

GLubyte* OpenImage(const std::string& filename, unsigned int& w, unsigned int& h, unsigned int& d)
{
	if(filename.find(".ppm") != std::string::npos){
		return ImageTools::OpenImagePPM("./textures/"+filename, w, h, d);
	}
	else {
		return ImageTools::OpenImageDevIL("./textures/"+filename, w, h, d);
	}
	std::cout << "Erreur de chargement de l'image " << filename << std::endl;
	return NULL;
}

and this function will return ImageTools::OpenImageDevil();

but affter

GLubyte* data = ImageTools::OpenImage(heightmap, m_nHMWidth, m_nHMHeight, d);

i donot know why data is a bad ptr?

Toanso's picture
migueltk wrote:

Try it with the source code I've used.

GLSL Demo

Thank you very much, but there will be same problem when i compile it.