![]() |
|
2D Image Generation & openGL - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: Graphics & Audio Programming (/forum-9.html) +--- Thread: 2D Image Generation & openGL (/thread-4405.html) |
2D Image Generation & openGL - LWStrike - Mar 28, 2006 02:26 PM I plan to have a 2d software buffer which will be 640x480. I want to generate an image to that buffer -every frame- and draw it with openGL. From what i remember textures are required to be 2^n (being no more then 512pixels?) From what i can tell is after i generate the openGL texture i apply the texture data with glTexImage2D. The problem is there is no pitch, so i would have to make a 2nd software, blt the chunk i want to it and then use glTexImage2D on that. Since i am doing it every frame i would like to minimize overhead. Is there a way i can use a pitch? or maybe allocate vram data for textures and directly blt/dma/write to that from my software image buffer? I hope i was not confusing. Generally my terminology sucks. 2D Image Generation & openGL - OneSadCookie - Mar 28, 2006 03:32 PM if you use the GL_TEXTURE_RECTANGLE_ARB target, your textures do not have to be power-of-two, though there are other restrictions. http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_rectangle.txt 2D Image Generation & openGL - OneSadCookie - Mar 28, 2006 03:34 PM if you texture from a pixel buffer object, you can get an asynchronous DMA to VRAM, too: http://oss.sgi.com/projects/ogl-sample/registry/ARB/pixel_buffer_object.txt |