Sign in to follow this  
razonic1977

OpenGL Heightmap Lighting

Recommended Posts

I have been working on a quadtree based heightmap editor for a couple months now. with my implementation the heightmap sizes are required to be 2^n+1 The real time light map functions updates a image buffer while the brush is being used (the mouse button is pressed applying the brush to some set position on the heightmap) Once the mouse button is released the image buffer is loaded into opengl. I have been using a image buffer with a resolution of <= the heightmap resolution because this function is really only to give you depth on the terrain while your are editing it. I have a custom ray tracer written for a more realistic non real time light map. This worked just fine on my desktop but my laptops gl driver does not like it. I know gl likes the textures to be 2^n but it was really hard for me to justify the cost in my code to resize a texture by such a small amount so often when i thought all was well on my desktop. I was just hoping gl could do it more efficiently then me until i realized that will not work with every gl implementation. Does anyone know of anything else i might be able to do or try? Is it possible to update a set region of a loaded gl texture? Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this