🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Extracting Info from Bitmaps for Landscapes

Started by
2 comments, last by Phrantik 24 years, 1 month ago
Hi everyone! I'm trying to code a landscape in OpenGL that's generated from a bitmap. At the moment i'm trying to load the bitmap in as a texture to memory and then read the bitmap information, but i'm not having much luck! I want to use the bitmap pixel/colour info as a heightfield map for the landscape. Has anyone any advice? - Phrantik Edited by - Phrantik on 5/14/00 4:33:57 AM
..:: Phrantik ::..
Advertisement
I''m not a guru with this kind of thing, but most people use a greyscale bitmap and use varying degrees of white to build up height, after you''ve loaded the bitmap into memory (you do not need to make it an OpenGL texture) read back information from the data pointer and use the increasing values of white to correspond to a y coordinate in the world.
It''s just an idea, not sure how well it would work.

-Mezz
Thanks! I was probably having trouble reading in the data because I had read it in as a texture.. =)
..:: Phrantik ::..
Yeah, OpenGL protects it''s textures once you''ve loaded them, and you can''t get access (this keeps it as compatible as possible).

Morgan

This topic is closed to new replies.

Advertisement