View Full Version : direct access to vram
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.
[This message has been edited by KC1 (edited 08-12-2003).]
i thing i found something: glCopyPixels()
08-12-2003, 02:42 AM
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.
08-12-2003, 05:59 AM
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 http://www.opengl.org/discussion_boards/ubb/biggrin.gif
yes, you are right, yesterday i found an example looking like this from nehe and it works good
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.