Graphics

Reply

Level 1

Level 1
raysan5
Posts: 11
Registered: ‎06-07-2012
Message 1 of 2 (161 Views)
Accepted Solution

Why ShallowCopy()?

 

I've seen in some examples the use of ShallowCopy() to assign a texture. For example, it's used in SampleLib\SampleSprite.cs

 

Why it's used that function and not assigned the texture directly (this.texture = texture:smileywink:

 

Is a matter of passing by value intead of passing by reference? If it is, why is done that way?

 

Thanks for your answers!

Please use plain text.

Re: Why ShallowCopy()?

Hi:

 

I think just because someone coded using shallowcopy and forget about sharing it, or simply because they thought in change it at render time. That's my fast first idea of.

 

Cheers,

Please use plain text.
This widget could not be displayed.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。






Recent News