Really(REALLY) Annoying

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Really(REALLY) Annoying

theatron
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 Razz.
https://drive.google.com/file/d/0B-RT7r-R1wP9NGRhN2hRWXlGLTA/edit?usp=sharing
thanks if you wanted to help.

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Really(REALLY) Annoying

Jonathan Dearborn-2
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

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Really(REALLY) Annoying

theatron
In reply to this post by theatron
Tried it, didnt work.

thanks though.

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Really(REALLY) Annoying

Andreas Schiffler-2
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 texture

On 3/17/2014 6:50 PM, theatron wrote:
Tried it, didnt work.

thanks though.


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Really(REALLY) Annoying

Andre D
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
<[hidden email]> 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
> [hidden email]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
>
> _______________________________________________
> SDL mailing list
> [hidden email]
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Reply | Threaded
Open this post in threaded view
|

Re: Really(REALLY) Annoying

theatron
In reply to this post by theatron
Very Happy 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

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org