2D Image Generation & openGL

LWStrike
Unregistered
 
Post: #1
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
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
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Image Textures mikey 52 25,983 Jun 30, 2009 10:42 AM
Last Post: AnotherJake
  Vertex buffer generation and rendering iphone eliscool 2 2,794 Dec 17, 2008 05:57 PM
Last Post: ThemsAllTook
  Displaying image with OpenGL and DevIL in C? leRiCl 13 9,613 Jan 23, 2007 01:25 PM
Last Post: djork
  OpenGL Preferred Image Format (BMP, TIFF, ect) Justin Brimm 7 5,103 Apr 18, 2006 03:28 PM
Last Post: arekkusu
  How does one rotate a scanned image in openGL? WhatMeWorry 16 8,824 Feb 2, 2005 09:25 PM
Last Post: arekkusu