Results 1 to 7 of 7

Thread: Adress of Video Memory. Where is A000:0000?

  1. #1
    Guest

    Adress of Video Memory. Where is A000:0000?

    Hello.
    I am looking for the adress of the video memory. It used to be A000:0000 when I used to work with the mode 13h.

    Where is it when I use opengl?
    ( I use glutFullScreen and I use Windows, Visual C++ )

    Thank you very much

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    Linz, Austria
    Posts
    9

    Re: Adress of Video Memory. Where is A000:0000?

    Originally posted by 2D Man:
    Hello.
    I am looking for the adress of the video memory. It used to be A000:0000 when I used to work with the mode 13h.

    Where is it when I use opengl?
    ( I use glutFullScreen and I use Windows, Visual C++ )

    Thank you very much
    you can't access the video memory in the linear fashion as it was possible in mode 13h, because of memory bank switches, which are used for higher resolution/bitdepth video modes.
    why do you need to access the vmem with opengl?

  3. #3
    Guest

    Re: Adress of Video Memory. Where is A000:0000?

    Thank you for your answer. I am quite surprised that such an adress doesn t exist with OpenGL, because when I used to work with DirectDraw, I could get such an adress :
    LPDIRECTDRAWSURFACE could give me the adress where I could write my pixels on my own.

    I want to get this adress in order to write my own 2D function to write with fonts faster than OpenGL. I used glRasterPos and glDrawBitmap, but it goes very to slow! even when I disable DEPTH_TEST, Texture, blending, zoom factor... etc.

    Thank you

  4. #4
    Guest

    Re: Adress of Video Memory. Where is A000:0000?

    I am surprised of your answer because with Direct Draw, you can get the adress of a DIRECTDRAWSURFACE, by using Lock, GetSurface, and UnLock.
    Anyway, I want this adress because I find 2D copy really too slow, even when I disable Texture, DepthTest, Zoom, Blending, and whatever you want.
    Thank you very much

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Adress of Video Memory. Where is A000:0000?

    What if you get the address to the video memory, what are you supposed to do then? Since the OpenGL spec doesn't say the frame buffer has to be of a specific format, you can never know how the data is actually stored in the frame buffer. You don't know if it's interleaved RGB, RGBA, BGR, BGRA, ABGR or anything else, or even three/four separate buffers, one for each channel. Thats problems witht he format only. Other problems can be row pitch (or what it's called). If a row is 640 pixels wide, the graphics board might pad the row to 1024 pixels for more effective address calculation, and how are you supposed to know if that's the case?

    Do a search on "pointer to frame buffer", or similar, in the suggestions forum. It has been discussed lot's of times before.

    And as you say, in DirtyDraw you must lock the frame buffer before you can use it. That means the pointer you get may not be the pointer to the frame buffer itself, but a copy of it. The reasons can be the driver need to convert the contents of the frame buffer to a format the user can use, and when you unlock it, it gets converted back again.

  6. #6
    Guest

    Re: Adress of Video Memory. Where is A000:0000?

    Originally posted by 2D man:

    I want to get this adress in order to write my own 2D function to write with fonts faster than OpenGL. I used glRasterPos and glDrawBitmap, but it goes very to slow!
    By the way, if you want to do 2D (this is your case), a faster way is to write to a simple block of system memory your text, bind it as a texture and let OpenGL render it as a flat quad in front of the screen. This is easily done with glOrtho(). I'm sure the exact use of this function to do 2D is found on this forum archives.

    Regards,

  7. #7
    Member Contributor
    Join Date
    Jan 2001
    Posts
    59

    Re: Adress of Video Memory. Where is A000:0000?

    Use gluOrtho2D like this:

    glMatrixMode (GL_PROJECTION);
    gluOrtho2D (0, 640, 0, 480);
    glMatrixMode (GL_MODELVIEW);
    glLoadIdentity();
    //Do your 2D drawing here, remember inverted Y axis!

Similar Threads

  1. Replies: 0
    Last Post: 05-20-2009, 12:14 AM
  2. class's pointer to its own adress ?
    By divide in forum OpenGL: General
    Replies: 2
    Last Post: 12-09-2004, 07:30 AM
  3. Query Video Card Info (Video Memory size?)
    By macbearchen in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-17-2003, 02:12 AM
  4. Video memory and AGP memory problem
    By dilectio in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-02-2002, 04:39 AM
  5. Video memory to system memory
    By SolomonS in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 05-19-2000, 01:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean