{"id":444,"date":"2009-02-25T21:38:21","date_gmt":"2009-02-25T11:38:21","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=444"},"modified":"2009-02-25T21:38:21","modified_gmt":"2009-02-25T11:38:21","slug":"adjustment-to-texture-mapping-api","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2009\/02\/25\/adjustment-to-texture-mapping-api\/","title":{"rendered":"Adjustment to texture mapping API"},"content":{"rendered":"

In case anybody’s using VectorStorm for their own stuff, I wanted to make a quick comment about an upcoming change to the texture API.\u00a0 I’ve made this change inside the Lord codebase, and will be migrating it back into trunk as soon as it’s definitely stable.<\/p>\n

In the previous API, to get a texture you called “vsTextureManager::Instance()->LoadTexture(“filename”);<\/em>“, and when you were finished with the texture, you let it leak.\u00a0 In the new API, you just call “new vsTexture(“filename”);<\/em>“, and delete the object normally when you’re finished with it.\u00a0 The new system still reference-counts textures internally (so if the texture is already loaded, you won’t end up with a second copy clogging up your video card’s memory or anything), but will now throw assertions if you don’t clean up your textures properly when your game shuts down.\u00a0 This makes textures work the same way as other objects within VectorStorm.<\/p>\n

(wow.. nothing for two weeks, and then three posts in two days!\u00a0 It never rains but it pours!)<\/p>\n","protected":false},"excerpt":{"rendered":"

In case anybody’s using VectorStorm for their own stuff, I wanted to make a quick comment about an upcoming change to the texture API.\u00a0 I’ve made this change inside the Lord codebase, and will be migrating it back into trunk as soon as it’s definitely stable. In the previous API, to get a texture you…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[4,3],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-7a","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/444"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=444"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/444\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}