Skip to main content

Timeline for How to I create a resource manager?

Current License: CC BY-SA 4.0

15 events
when toggle format what by license comment
S Feb 13, 2023 at 15:36 history suggested Glorfindel CC BY-SA 4.0
broken link fixed, cf. https://meta.stackoverflow.com/a/406565/4751173
Feb 12, 2023 at 12:03 review Suggested edits
S Feb 13, 2023 at 15:36
Jun 16, 2020 at 10:15 history edited CommunityBot
Commonmark migration
Apr 13, 2017 at 12:18 history edited CommunityBot
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Apr 25, 2012 at 17:29 history edited user159 CC BY-SA 3.0
deleted 920 characters in body
Apr 25, 2012 at 17:07 comment added Kikaimaru let us continue this discussion in chat
Apr 25, 2012 at 17:05 comment added user159 @Kikaimaru yes you would have to. No matter what method you used, if you are sharing the same object a change in one will show a change in the other. If he wants two distinct copies he will have to deep copy. How you do that is up to you.
Apr 25, 2012 at 17:00 comment added Kikaimaru When you load model file, it will call directx routines to create new vertex buffer object and then fill it with vertices from file. When you make copy, you will only copy pointer to that unamaged data (i supposose you dont want to make deep copy of unamanged memory)
Apr 25, 2012 at 16:58 comment added user159 @Kikaimaru To plays devil's advocate, where did you hear this? Using the second or third method above is doing essentially the same thing. You are creating a second copy of the entire data structure. I can do that via loading from disk or re-serializing it again in memory and it shouldn't matter. Both ways cause me to create a new copy of the whole object. No offense here (and I could be 100% wrong) but you do know what I mean by deep copy right? I'm not talking about a shallow copy.
Apr 25, 2012 at 16:54 comment added Kikaimaru Yes, it will have pointer to that vertex buffer in unamanged memory. And when he will try to edit it (destructible geometry), it would affect all meshes that has pointer to that vertex buffer. (Well but I don't know where vertex buffer data are stored, and where do dynamic vertex buffer store them) so it's just a thought.
Apr 25, 2012 at 16:43 history edited user159 CC BY-SA 3.0
added 802 characters in body
Apr 25, 2012 at 16:29 comment added user159 I could very well be wrong as I have never done it, but I think it is the other way around. The Texture2d is just a location in memory. doing a deep copy just creates a perfect clone in another location essentially doing what you want. the DX stuff will have pointers to THAT location in memory.
Apr 25, 2012 at 16:27 history edited user159 CC BY-SA 3.0
added 576 characters in body
Apr 25, 2012 at 16:23 comment added Kikaimaru Are you sure you can make copies like that of things like texture or vertex buffer, that has pointer to some unmanaged directx stuff?
Apr 25, 2012 at 16:15 history answered user159 CC BY-SA 3.0