direct access to video memory
is it possible to get direct access to video memory in opengl, as in directx direct draw? so i can plot my data strait to the memory so it gets displayed into the screen, would save some pain :D
thanks
You have to use DirectDraw under Windows and GLX (AFAIK) under Linux to get direct frame buffer access
"No, and it''s a good thing too"
Wrong, indirect transfers are slower
"No, and it''s a good thing too"
Wrong, indirect transfers are slower
It''s a pain for the gaphic card when you write directly to its memory...
It''s better when it''s painfull for you rather than the hardware.
Obviously it''s better when it''s painfull for noone/nothing.
-* So many things to do, so little time to spend. *-
It''s better when it''s painfull for you rather than the hardware.
Obviously it''s better when it''s painfull for noone/nothing.
-* So many things to do, so little time to spend. *-
okay so to display a texture on i just have to loop through and use glWritePixel, any ideas on its parameters, cuz i did a quick search with google, and there are no examples or definitions of glWritePixel that came up
To display a texture you map the texture to a quad and display that. Check out the NeHe tutorials.
http://nehe.gamedev.net/
http://nehe.gamedev.net/
quote:Original post by supagu
okay so to display a texture on i just have to loop through and use glWritePixel, any ideas on its parameters, cuz i did a quick search with google, and there are no examples or definitions of glWritePixel that came up
Look in MSDN. msdn.microsoft.com
If you want to draw a texture straight the to the screen without any geometry glDrawPixels can be used:
where GL_PIXEL_FORMAT is something like GL_RGB and GL_DATA_FORMAT is something like GL_BYTE_UNSIGNED. The last parameter is a pointer the the texture data you have loaded. This will draw the entire texture to screen in one go.
glDrawPixels( imagewidth, imageheight, GL_PIXEL_FORMAT, GL_DATA_FROMAT, pointer_to_data );
where GL_PIXEL_FORMAT is something like GL_RGB and GL_DATA_FORMAT is something like GL_BYTE_UNSIGNED. The last parameter is a pointer the the texture data you have loaded. This will draw the entire texture to screen in one go.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement