Is unlock necessary if I'm doing drop? (IImage)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
AlexAzazel
Posts: 31
Joined: Sun Jan 10, 2016 3:42 pm
Location: Tbilisi

Is unlock necessary if I'm doing drop? (IImage)

Post by AlexAzazel »

When using IImage object, is using unlock after lock necessary if I'm doing drop anyways?
A trivial question but still interesting. I suspect it's not necessary.
CuteAlien
Admin
Posts: 9682
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Is unlock necessary if I'm doing drop? (IImage)

Post by CuteAlien »

Basically doesn't matter at all as unlock() was never used (it does exactly nothing). In trunk we even deprecated it and replaced lock/unlock by a getData() function.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Is unlock necessary if I'm doing drop? (IImage)

Post by Cube_ »

wait, unlock doesn't do anything? Huh... so the call to unlock in my screenshot logic is irrelevant then?
"this is not the bottleneck you are looking for"
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Is unlock necessary if I'm doing drop? (IImage)

Post by hendu »

It matters for textures only.
CuteAlien
Admin
Posts: 9682
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Is unlock necessary if I'm doing drop? (IImage)

Post by CuteAlien »

Yeah, IImage::unlock() does nothing while ITexture::unlock() is important.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
AlexAzazel
Posts: 31
Joined: Sun Jan 10, 2016 3:42 pm
Location: Tbilisi

Re: Is unlock necessary if I'm doing drop? (IImage)

Post by AlexAzazel »

CuteAlien wrote:Basically doesn't matter at all as unlock() was never used (it does exactly nothing). In trunk we even deprecated it and replaced lock/unlock by a getData() function.
I will sound dumb but what is that trunk thing I keep hearing? I googled it and found a git repo that has no description other than how to install and stuff. What exactly does it do and how is it different?
CuteAlien
Admin
Posts: 9682
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Is unlock necessary if I'm doing drop? (IImage)

Post by CuteAlien »

We are still using svn. svn repository is here: https://sourceforge.net/p/irrlicht/code/HEAD/tree/
That side should also have the command to check-out trunk which is our most active development branch and will become Irrlicht 1.9
You need a svn client (like TortoiseSVN on Windows).

As for installing:
You have to compile it yourself with the project file and then you got a new dll.
You have to set the corresponding include and library paths in your project to include that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply