direct access to vram

hello

i want to combine typical opengl (triangles) with my voxel-engine. at the moment i render the voxels as a bitmap and bind it to a texture and draw it as a quader to the background.
is there a faster way in opengl? can i get the adress of the backscreenbuffer, so i can directly draw to it.

greetings,
KC1

[This message has been edited by KC1 (edited 08-12-2003).]

i thing i found something: glCopyPixels()


KC1

Texture is already stored in VRAM so to speed this up can use texture compression. You can directly get into VRAM if you want to store e.g. some vertex data. There is a function from nVidia which allocates memory similar to malloc (with three more parameters) called wglAllocateMemoryNV. I don’t know ATI function like that but, you should check search their website if you want.

[This message has been edited by glYaro (edited 08-12-2003).]

You’re not advise to use vram directly (that’s why only Nvidia does so).

Textures are normally stored in vram, but to ensure that (at least to tell Opengl you want to do so), use textures priorities.

OpenGL doesn’t provide any mechanism for direct frame buffer access like DirectX does with surfaces. I run into this a lot porting DirectX games to MacOS.

Your best bet is probably to render directly to the texture after it is bound. See this example on NeHe: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=29

thanks to all for answers

@rtargosz
yes, you are right, yesterday i found an example looking like this from nehe and it works good