Skip to main content
gamedev.net
🔒 Locked

memory mapping !!?

Started by rojbi Jun 5, 2006 at 4:10 AM 9 replies 950+ views
Original Post
rojbi
rojbi
Hi all, I'm trying to write software to display a big floating point textures (RGB image 32 float). I am using : glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, GL_FLOAT_RGB32_NV, w1, h1, 0, GL_RGB, GL_FLOAT, tableau); I now that it is possible to use Memory Mapping (CPU) but i'm not sure if it is possible in the case of shader+OpenGl(GPU)? Thanks a lot.
dave
dave
Hi,

I'm not sure what you mean by 'memory mapping'.

Care to explain?

Dave
rojbi
rojbi
i think it is useful to use memory mapping when the texture is so big , it permit to manage the memory (swapping..)
Evil Steve
Evil Steve
The largest texture you're likely to use is 4096x4096, and that'll only take up 64MB of memory. I really don't think it's worthwhile using memory mapping to do this.
But if you are, there's no reason you can't pass the pointer to the data (from MapViewOfFile() [assuming Win32]) to OpenGL.
Evil Steve
Evil Steve
Quote:
Original post by Anonymous Poster
Thank you
the problem, that i must display astrophysics image (1Go to 8Go : 16000*16000 for example)In float 32 Byte , so with this limit of 2096^2 is not possible !
In that case you might not to be able to. You'd need to map a 976MB area of memory, which is bound to cause some problems.
The pointer you pass to OpenGL has to contain a view of the entire file.
Trap
Trap
Look at this thread: megatexures, you might be able to use a similar technique
mikeman
mikeman
What exactly is that you want to do? Based on the program, there might be solutions other than dumping a big-ass texture to RAM or VRAM. For example, are you sure the texture can't be generated on the fly in the shaders? If the calculations are too complex to be performed entirely in real time, are you sure that you can't precompute some of the data and put them in a low-res texture, using that as a base to do more lightweight on-the-fly calculations with less performance hit?
rojbi
rojbi
thanks for your post,
The problem that the texture image is very large (1 to 8GO) and i must be able to display this image in the framebuffer. I don't now how ?

I see that it is possible to display large texture with SGIX_clipmap extention (used by Qauque to display large texture) :
http://oss.sgi.com/projects/ogl-sample/registry/SGIX/clipmap.txt
but i don't now if my video card : Nvidia 5200 support this extention because i can not find this extention by glxinfo !!!
any idea ?
thanks
ps: the real time is not required in my application

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.