how can I get the video address in openGL???
You can’t, and even if you can, you can’t know for sure whats in there since the specification doesn’t say anything about how the individual pixels in the framebuffer is supposed to be stored. Search the forum for more details.
There is no associated address. The framebuffer starts at position 0,0 in the glReadPixels call
I believe that’s more of a windowing system question.For example XFree86(*nix OS) has the DGA extension which can be used for that(as well as other)purposes.For widoze though I don’t have a clue.
Well, I did a quick search on google, and came up with this (obviously we’re talking about the front ‘entire desktop’ buffer):-
#include <sys/neaptr.h> // Protected mode enable/disable // This function is SLOOOW. Call it at the start of your program if (__djgpp_nearptr_enable() == 0) // Remember, won't always work! exit(EXIT_FAILURE); // Or whatever
// You have to do the add each time you set a pixel, because
// __djgpp_conventional_base can change at any time
unsigned char* screenptr = (unsigned char *)(__djgpp_conventional_base + 0xA0000);
// Here’s the cool part, a red pixel the easy way
screenptr[320 * y + x] = 4;
// At the end of your program: turn memory protection back on, please
Here’s the web page:- http://www-scf.usc.edu/~akotaobi/gptut2.html
[This message has been edited by knackered (edited 06-06-2002).]
Run, don’t walk, away.
No celic, just think of all the image post-processing you could do with that level of access…
I think that code is for mode 13h or something. Notice the index: [320*y+x]
That indicates a resolution of 320 pixels wide. Alsp notice each pixel is an unsigned char? Means you are in color index mode (256 colors). I doubt this code will help much with openGL (unless you are talking about some DOS openGL implementation).
[This message has been edited by LordKronos (edited 06-07-2002).]
you can manipulate the final on-screen image with a big magnet