Results 1 to 2 of 2

Thread: Where is OUT OF MEMORY when allocate textures?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2010

    Where is OUT OF MEMORY when allocate textures?

    As a C++ programmer, I always have in mind that "new" may throw and malloc() may return 0, because of OUT OF MEMORY.

    I check glBindTexture(), glTexStorage*() and glTexSubImage*().
    Every returning error, is basically a bad parameter error.
    Where is runtime errors like OUT OF GPU TEXTURE MEMORY?

    PS: My textures are very small, but I am curious.

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    No functions are stated to return GL_OUT_OF_MEMORY, because any OpenGL function can do so.

    GPU memory is not necessarily allocated when you ask for it to be. Implementations are permitted to defer such allocations whenever they want. There's really not much you can do if you ever get such an error anyway, since you can't track down what caused it. You also can't tell what resulted from it, since any function that issues that error has undefined behavior.

Similar Threads

  1. Replies: 3
    Last Post: 07-20-2015, 12:50 AM
  2. Replies: 1
    Last Post: 08-08-2014, 04:59 PM
  3. Allocate __private memory inside a kernel
    By tehwalrus in forum OpenCL
    Replies: 1
    Last Post: 11-23-2011, 03:58 PM
  4. Can i allocate memory inside kernel?
    By luizdrumond in forum OpenCL
    Replies: 5
    Last Post: 02-22-2011, 11:10 AM
  5. Replies: 1
    Last Post: 02-20-2011, 10:48 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