Sign in to follow this  
Trent Linton

Need Help Converting Allegro to OpenGL

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

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