Advertisement Jump to content
Sign in to follow this  
Zmurf

OpenGL GrayScale Terrain, .RAW Files?

This topic is 4917 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I bought 'Beginning OpenGL Game Programming' book and I'm looking at the heightmap part and it says that we load a 32 x 32 Targa Gray Scale image to define our heights in the height map. But when I look at the source code on the CD it uses a .Raw file to do this. When I make my own height map and save it as a Targa it won't load properly into the window. Whats going on?

Share this post


Link to post
Share on other sites
Advertisement
1st. make sure you are saving your .tga images as a greyscale image and I am unsure if you are saving them as compressed or not but if you don't have code to decompress them you will have issues. .RAW isn't a good format use .tga or .bmp for your heightmap. One reason why people use .raw is its easy to load if you know the size ahead of time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!