Skip to main content
gamedev.net
🔒 Locked

Locking a texture

Started by mateo Apr 27, 2006 at 3:49 PM 3 replies 900+ views
Original Post
mateo
mateo
Does anybody have an example of how to lock a texture and retrieve a pointer to the surface to draw on it directly? Preferably some c++ code. Thanks.
ClementLuminy
ClementLuminy
Just have a look into the DirectX Sdk documentation and look for the IDirect3DTexture9::LockRect Method....

Good luck !!! ;)


Clem
mateo
mateo
All Right, thanks CircleSoft
Looks like its going to be more involved and cost too much in performance to implement. I've already figured out a better way.
Thanks for your help.
circlesoft
circlesoft
Quote:
Original post by mateo
All Right, thanks CircleSoft
Looks like its going to be more involved and cost too much in performance to implement. I've already figured out a better way.
Thanks for your help.

Good. Most of the time, when it comes to texture locking, there is a much better way to do it. The exception is at init time when you are loading custom textures or creating them parametrically. But generally, you never want to lock them at runtime.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.