Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Access Violation, and Sprite Clipping?  (Read 4774 times)

0 Members and 1 Guest are viewing this topic.

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
Access Violation, and Sprite Clipping?
« on: April 24, 2009, 11:11:00 pm »
I am getting an access violation when the window closes, I'm only calling it once; I do have multiple sprites/images which I've read on here might cause the error. The thread I read about this didn't have a clear solution, has this issue been resolved?

The other question is about object clipping. Only rendering a specific region(rectangle) within the sprite. Is this going to be included in any future updates? Is there some per-built way I can clip/mask the objects? At the moment I need this for my Text-Box;

I want any part of the string to be clipped once exceeding the components Size bounds; Though I do not wanna do this simply by removing characters out of the bounds, I would like to add pixel-scrolling; So I'd like to see parts of a character clipped out, rather then individual characters.

P.S : Has the Joy-Stick issue has been resolved?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Access Violation, and Sprite Clipping?
« Reply #1 on: April 25, 2009, 12:22:03 am »
Quote
I am getting an access violation when the window closes

Is it happening at global exit, or really on window.Close()? Have you tried your debugger?

Quote
The other question is about object clipping. Only rendering a specific region(rectangle) within the sprite. Is this going to be included in any future updates?

The roadmap has the answer ;)

Quote
Is there some per-built way I can clip/mask the objects?

Currently not. Unless you use raw OpenGL.

Quote
P.S : Has the Joy-Stick issue has been resolved?

Yes sir.
Laurent Gomila - SFML developer

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
Access Violation, and Sprite Clipping?
« Reply #2 on: April 25, 2009, 01:07:23 am »
@"Is it happening at global exit, or really on window.Close()? Have you tried your debugger?" :

If I close the application using the consoles 'close' icon there are no issues, if I close it using the SFML Window Close event via sf::RenderWindow.Close() then I get the error.

@"The roadmap has the answer Wink" : what? lol I'll search for 'roadmap' >_>

SamuraiCrow

  • Newbie
  • *
  • Posts: 40
    • Yahoo Instant Messenger - samuraileumas
    • View Profile
Access Violation, and Sprite Clipping?
« Reply #3 on: April 25, 2009, 04:55:55 am »
The roadmap is a link on the main SFML webpage.

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
Access Violation, and Sprite Clipping?
« Reply #4 on: April 27, 2009, 11:21:25 am »
SubRect method exist within the sf::Sprite class, though not within the sf::String class, any reason for this? Can this please be implemented..?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Access Violation, and Sprite Clipping?
« Reply #5 on: April 27, 2009, 11:33:13 am »
Quote from: "ninjamint"
SubRect method exist within the sf::Sprite class, though not within the sf::String class, any reason for this? Can this please be implemented..?

SetSubRect selects the rectangle to render in the source image. This is not related to clipping at all, and this would make no sense for sf::String.
Laurent Gomila - SFML developer

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
Access Violation, and Sprite Clipping?
« Reply #6 on: April 27, 2009, 11:41:31 am »
I would like to 'clip' my 'sf::String' so that it only renders part of the string texture;

Rather then displaying the entire string, only displaying the first 100pixels, opposed to simply erasing characters that exceed or lay on the 100th pixel..
I need this for proper 'scrolling' when  create my text-box;

Though you say that isn't the case, so how else might I do this?

Note: A friend told me 'SubRect' was to render only a region of some image, which in that scenerio it made since.. (he's been using SFML via the .Net wrapper)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Access Violation, and Sprite Clipping?
« Reply #7 on: April 27, 2009, 11:43:35 am »
Didn't I answer to all your questions related to clipping in my first post?
Laurent Gomila - SFML developer

ninjamint

  • Newbie
  • *
  • Posts: 15
    • View Profile
Access Violation, and Sprite Clipping?
« Reply #8 on: April 27, 2009, 11:45:52 am »
I guess you did, but I didn't really like them.. >_> I'll look through the source and maybe write my own string class to handle this. e_e

Thanks!

Edit: I guess I cannot look through the source as it's not open to public, or I cannot find it.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Access Violation, and Sprite Clipping?
« Reply #9 on: April 27, 2009, 02:25:03 pm »
Quote
I'll look through the source

There's not much to find in the source for your clipping issue, like I said this feature is not implemented yet. Everything has to be done.

Quote
and maybe write my own string class to handle this

This is not related to strings, the feature you need is a pixel mask (which can thus work on any drawable class -- not just sf::String).

Quote
I guess I cannot look through the source as it's not open to public, or I cannot find it

You can browse the SVN repository from the sourceforge.net page, or simply download the full SDK which contains the source code.
Laurent Gomila - SFML developer

 

anything