reading in height map
I would like to read in a bmp file as a height map for a game. Is it possible to use auxDIBImageLoad ? How do I get the color values from it ?
Nitzan
-------------------------
www.geocities.com/nitzanw
www.scorchedearth3d.net
-------------------------
quote:
Original post by nitzan
I would like to read in a bmp file as a height map for a game. Is it possible to use auxDIBImageLoad ? How do I get the color values from it?
It may be, I don''t know. However, I advise you not to use GLaux. I know that DevIL allows you to get pixel data, and it is a whole lot less buggy than GLaux. You could always write your own image loading functions (bitmaps are particularly easy to load) if you feel like it.

since youre only loading heightmap data, you might as well load monochrome raw data. only problem is if the size of your terrain changes. when I was playing around with heightmaps, i made my own format which basically consisted of two ints at the beginning defining width and height, and then raw data. simple to load, simple to create.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement