• Advertisement

Archived

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

direct access to video memory

This topic is 5492 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
No, and it''s a good thing too

You can use glWritePixels if you must.

Share this post


Link to post
Share on other sites
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
quote:
Original post by python_regious
Bear in mind that this is shit slow...

Death of one is a tragedy, death of a million is just a statistic.


y ? isn''t glDrawPixel the fastest way to draw geometry ? humm i don''t get it

Share this post


Link to post
Share on other sites
quote:
Original post by Metal Typhoon
y ? isn''t glDrawPixel the fastest way to draw geometry ? humm i don''t get it

glDrawPixels doesn''t draw geometry. Are you thinking of glDrawArrays or glDrawElements? The problem with glDrawPixels is most (but not all) consumer level video cards have it implemented poorly in their drivers. When I say poorly, I don''t mean "unusably bad", just "not so great". To get the most speed out of it, it normally helps to make sure the data is the same format as the buffer it is being written into.

Share this post


Link to post
Share on other sites
quote:
Original post by Null and Void
[quote]Original post by Metal Typhoon
y ? isn''t glDrawPixel the fastest way to draw geometry ? humm i don''t get it

glDrawPixels doesn''t draw geometry. Are you thinking of glDrawArrays or glDrawElements? The problem with glDrawPixels is most (but not all) consumer level video cards have it implemented poorly in their drivers. When I say poorly, I don''t mean "unusably bad", just "not so great". To get the most speed out of it, it normally helps to make sure the data is the same format as the buffer it is being written into.



nvm :D i was thinking of glDrawElements

Share this post


Link to post
Share on other sites

  • Advertisement