Jump to content
  • Advertisement
Sign in to follow this  
Trent Linton

Need Help Converting Allegro to OpenGL

This topic is 2170 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

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!