Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

direct access to video memory

This topic is 5579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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. *-

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
If you want to draw a texture straight the to the screen without any geometry glDrawPixels can be used:


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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!