Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Apr 2011
Offline Last Active Apr 09 2012 01:20 AM

Posts I've Made

In Topic: multiple png textures in 2d game

09 April 2012 - 01:23 AM

I figured out my main problem. Before when I ran the program even if I said what texture to use it would still always use the one texture. I realised that I was setting what texture to use inside of glBegin and glEnd and it wouldn't work. Moving my funtions outside allowed me to switch between the textures. Thanks for all your help guys.

In Topic: multiple png textures in 2d game

08 April 2012 - 06:54 PM

Ok I kind of get what you mean, but I still don't know how to reference what sprite I will be using when im in my drawscene function. I need to somehow specify what image glTexCoord2f uses as it just uses the last image loaded, and it would be to much of a performance hit to keep reloading an image from a file.

In Topic: variable problems

30 July 2011 - 08:14 PM

Well you see the +3 was because +1 did not work.

In Topic: variable problems

30 July 2011 - 06:24 AM

Hey well i fixed my problem. :lol:

It was just an issue which I was modifying memory I was not supposed to. I had to change the following:




now I'm trying to work on my collision detection system (which is not going to well)

anyway I thank you guys for your help.

In Topic: variable problems

18 July 2011 - 02:29 AM

ok I found the problem line of code.

fscanf(input_file, "%d", &map_height); //line 29

The problem is that I don't know whats wrong with it.

If I comment it out the program runs but if I put it back in it stops working?

what do I do now?