Skip to main content
gamedev.net
🔒 Locked

Programmatically creating Texture

Started by gommo Dec 1, 2002 at 3:02 AM 0 replies 350+ views
Original Post
gommo
gommo
How can this be done. Do you get a texture via D3DXCreateTexture(..) and then LockRect() or something on it. If so, is it just a matter of declaring say a large BYTE array and filling it with the appropriate data depending on the texture format. Say RRGGBBAA then I have 4 BYTEs per pixel. Do I have to included any other data for the texture to be valid, like header information for that particular format etc.. Or is the best bet to construct a structure matching a particular file format and construct the image in memory, complete with header information etc.. and then use D3DXCreateTextureFromFileInMemory(..) ?? has anybody done any thing like this??

Topic Locked

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

Sign in to reply to this topic.