Results 1 to 5 of 5

Thread: How much memory do I need for 1280x800-24 window surface?

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2016

    How much memory do I need for 1280x800-24 window surface?

    I'm getting a bad alloc error from eglCreateWindowSurface when I try to use a 1280x800 frame buffer. The same code works with the frame buffer set to 1024x768 - 16. meminfo seems to suggest that I have plenty of ram:
    MemTotal: 2058728 kB
    MemFree: 1652032 kB
    MemAvailable: 1698644 kB

    I'm maxed out on ram for my board, so I'm not sure what I can change to get the buffer size I need.

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2013
    What kind of device are you using? Embeded board? PC? Integraded GPU on board or CPU? Graphic card? Name? etc...

    Because that makes a big difference here if you have a GPU with dedicated memory, a device that uses normal system ram but with a dedicated reserved area, or a device that can freely allocate from the normal system memory.

    In the case of a graphic card you have to find out how much ram your GPU has.

    With a integrated GPU you often can change the size of reserved system memory in the bios. So you may can set the value higher.

    There may be other limitations. Already hat some older GPUs/drivers on notebooks that could not create surfaces greater then the screen size, found out because this would break playing videos with a higher resolution.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2017
    1280x800 = 1,024,000
    * 3 = 3,072,000 bytes

    * 3 because 8 bits per byte.
    24 / 8 = 3.

    Now you need to know the size of your graphics memory.
    But 3 meg is nothing, so your probably doing something wrong. Strong-Grip Future Technologies.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jul 2012
    Also, you might request a resolution not supported by your hardware.
    Another remark: 1024*768 has 4/3 ratio whereas 1280*800 has a ratio of 1.6 (so it is not even 16/9).

  5. #5
    Newbie OpenGL Pro
    Join Date
    Jan 2007
    Typically there's no such thing as a 3 byte/24 bit format. Try creating it with 32 bits instead.

Similar Threads

  1. Replies: 1
    Last Post: 06-14-2012, 02:07 AM
  2. Multiuple window surface
    By gpgnews in forum OpenGL ES
    Replies: 2
    Last Post: 06-04-2009, 05:58 AM
  3. Replies: 0
    Last Post: 10-05-2008, 10:44 PM
  4. Posting surface to a window...
    By ufocd in forum OpenVG
    Replies: 2
    Last Post: 05-14-2007, 03:17 AM
  5. how can display the bmp in memory into window ?
    By kim1980 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-15-2001, 05:56 AM

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