2D Image Generation & openGL
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.
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.
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/r...tangle.txt
http://oss.sgi.com/projects/ogl-sample/r...tangle.txt
if you texture from a pixel buffer object, you can get an asynchronous DMA to VRAM, too:
http://oss.sgi.com/projects/ogl-sample/r...object.txt
http://oss.sgi.com/projects/ogl-sample/r...object.txt
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL Image Textures | mikey | 52 | 20,047 |
Jun 30, 2009 10:42 AM Last Post: AnotherJake |
|
| Vertex buffer generation and rendering iphone | eliscool | 2 | 2,378 |
Dec 17, 2008 05:57 PM Last Post: ThemsAllTook |
|
| Displaying image with OpenGL and DevIL in C? | leRiCl | 13 | 8,236 |
Jan 23, 2007 01:25 PM Last Post: djork |
|
| OpenGL Preferred Image Format (BMP, TIFF, ect) | Justin Brimm | 7 | 4,182 |
Apr 18, 2006 03:28 PM Last Post: arekkusu |
|
| How does one rotate a scanned image in openGL? | WhatMeWorry | 16 | 7,618 |
Feb 2, 2005 09:25 PM Last Post: arekkusu |
|

