Constructor problem: Loading Images

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Constructor problem: Loading Images

      Hi guys!

      After 9 hours last night writting a particle class, I came across a problem in my project and I'd like to get your guys comments please.

      Source Code

      1. someScene::Init( void )
      2. {
      3. Texture.Loadtexture(...)
      4. }

      If I move "Texture.Loadtexture(...)" into the default constructor, it will not render (I can not see) the image that I loaded. (The function that loads the image returns "true" in both cases, so I know its loading.) Any ideas as to why its not rendering my image? (Trust me no "DECLARE_CLASS" macros, :P). In my "Main loop" class, I have to do the following:

      Source Code

      1. MAINTHINGY::Init()
      2. {
      3. someScene.Init(..)
      4. ....
      5. }
      6. MAINTHINY::Render(..)
      7. {
      8. someScene.Render(..);
      9. ...
      10. }
      Display All


      I would like to get rid of the "Init(..)" in all my scene classes and just have the default constructor load any images, but again its not letting me put the "Loadtexture(...)" in the c_tor. I'm kinda stumped as to whats going on.

      Sabrina
    • RE: Constructor problem: Loading Images

      Guys, Please ignore the post. I've been kinda stupid. I kinda found the problem and it has nothing to do with the constructor (sorta).

      MrMike, I can not delete my original post on this subject. If you can please delete it...I'm kinda light headed today!