Sign in to follow this  

Need Help Converting Allegro to OpenGL

This topic is 1958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to convert a basic level editor in C++/Allegro. I just can't understand how I would convert this draw funciton used in Allegro to openGL.I basically have every other aspect of the editor down, but this I don't quite understand to convert. I have the Iterator loop in place its just the drawing part that I don't understand.




[source lang="cpp"]
// if tile is there draw it
if (tile > 0)
draw_sprite(screen, (BITMAP*)datTiles[tile].dat, i*TILE_SIZE, j*TILE_SIZE);
// else just draw black rectangle
else
rectfill(screen, i*TILE_SIZE, j*TILE_SIZE, i*TILE_SIZE+TILE_SIZE, j*TILE_SIZE+TILE_SIZE, 0);[/source] Edited by Trent Linton

Share this post


Link to post
Share on other sites

This topic is 1958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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