Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Creating textures on the fly

This topic is 5303 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

As yall know i did gldrawpixel and i got it working... but now i got an idea... is there anyway i can make a texture on the fly every frame that contains the graphics using my pixelinfo and then put the texture on the screen?

Share this post

Link to post
Share on other sites
I think what you're looking for is the glTexSubImage2D function. It allows you to "overwrite" a current texture with the contents of a memory location (ie. another image). You might also be interested in glCopyTexImage2D, which allows you to create a texture from the current read buffer, like the colour buffer, or depth buffer. This NeHe tutorial uses one of these functions to create a radial blur effect. What you're effectively doing is rendering to a texture, but I believe there are better ways of doing that than glCopyTexImage2D these days. Anyone care to elaborate?

Windows 95 - 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can't stand 1 bit of competition.

[edited by - iNsAn1tY on March 18, 2004 6:53:15 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!