• Advertisement
Sign in to follow this  

Need Help Converting Allegro to OpenGL

This topic is 2053 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
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
Sign in to follow this  

  • Advertisement