Archived

This topic is now archived and is closed to further replies.

Kackurot

Mapeditor

Recommended Posts

Im having trouble trying to make an map editor with opengl. I want to know how to split a texture up into tiles. Does anyone know how to plit up an texture? ny tile sizes are 32x32 64x64 and so on..

Share this post


Link to post
Share on other sites
texture coordinates range from (0.0f, 0.0f) to (1.0f, 1.0f)... so just divide your tile size by the texture width or height (in pixels) to get a scaled number from 0 to 1.

Share this post


Link to post
Share on other sites