Really(REALLY) Annoying

i tried in an old project and in a new project to object oriente a displayed image, and it doesnt work.
i have 3 classes a main window class, and a main character class, and a main. I checked the order and fixed the error and it still wont work. it would be good if someone could help me out with this :P.
https://drive.google.com/file/d/0B-RT7r-R1wP9NGRhN2hRWXlGLTA/edit?usp=sharing
thanks if you wanted to help.

The best thing to do when things aren’t working as you expect is to try to
find out what exactly is happening. Without any error checking or
logging (NULL checks, error codes, SDL_GetError()), you’ll just be guessing
about what is going on.

That… And maybe try calling SDL_Init()?

Jonny D

Tried it, didnt work.

thanks though.

Try this sequence:

  1. SDL_Init /w SDL_INIT_VIDEO - see C++ code here:
    https://wiki.libsdl.org/SDL_Init
  2. SDL_CreateWindow - see example here:
    https://wiki.libsdl.org/SDL_CreateWindow
  3. SDL_CreateRenderer (for 2D stuff) - see example here:
    https://wiki.libsdl.org/SDL_CreateRenderer
  4. SDL_LoadBMP/SDL_CreateTextureFromSurface - to create a texture
  5. SDL_PollEvent - to pump the event pipeline
  6. SDL_RenderClear/SDL_RenderCopy/SDL_RenderPresent to draw the textureOn 3/17/2014 6:50 PM, theatron wrote:

Tried it, didnt work.

thanks though.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Yeah, make sure your SDL_Init call is called with SDL_INIT_EVERYTHING
or SDL_INIT_VIDEO. Check all of your return values with error
checking, figure out which one is erroring then call SDL_GetError
after to find out what the error is. I bet you something is just
failing.On Tue, Mar 18, 2014 at 12:46 AM, Andreas Schiffler wrote:

Try this sequence:

SDL_Init /w SDL_INIT_VIDEO - see C++ code here:
https://wiki.libsdl.org/SDL_Init
SDL_CreateWindow - see example here:
https://wiki.libsdl.org/SDL_CreateWindow
SDL_CreateRenderer (for 2D stuff) - see example here:
https://wiki.libsdl.org/SDL_CreateRenderer
SDL_LoadBMP/SDL_CreateTextureFromSurface - to create a texture
SDL_PollEvent - to pump the event pipeline
SDL_RenderClear/SDL_RenderCopy/SDL_RenderPresent to draw the texture

On 3/17/2014 6:50 PM, theatron wrote:

Tried it, didnt work.

thanks though.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

:smiley: I got something from the sdl program, it says “invalid renderer”, i dont really know how to fix that, could give me a hand with this?
thanks