Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Using textures to draw terrains


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Big_Al482   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 July 2001 - 06:07 AM

I started reading OpenGL Game Programming (excellent book by the way), and I got a little stuck on chapter 8 with the terrain demo. Although I understand how it works, I tried to make my own terrain by making a simple grayscale 32x32 bitmap in Photoshop and loading it in. However, my program (and even the demo in the book) isn''t able to properly read the bitmap when I make it in photoshop, but it can read the terrain2.bmp that came with the demo program. Even when I edit the bitmap in photoshop and save it, it doesn''t work. But, when I edit it in Paint, it works fine. I tried editing it in photoshop and making my own in photoshop and then resaving it with Paint, but it still didn''t work. My guess is that Photoshop does something different in the bitmap header which the LoadBitmapFile() function the book gives you can''t handle (maybe RLE compression or something...) Anyway, my question: does anyone know how to either fix this in photoshop, or know of a decent graphics editing program that will work with the demo program (if you can''t tell...I really do not want to use paint to draw terrains....) Thanks

Sponsor:

#2 Khawk   Senior Staff   -  Reputation: 1362

Like
Likes
Like

Posted 20 July 2001 - 06:25 AM

Hmm, the bitmap function should work. Make sure that you''re saving it as a 24-bit BMP, even though it''s just gray data. The function won''t load any other type of BMP (sorry, ran out of time ).

If doing that still doesn''t work, then make another post here and if I get a chance I''ll check it out.

Kevin




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS