Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Drawing to large bitmap with OpenGL

  1. #1
    Newbie Newbie
    Join Date
    Nov 2018
    Posts
    2

    Drawing to large bitmap with OpenGL

    Hi,
    I have a question about drawing to large bitmap, something similar to 10k x 10k, what was asked in this thread 15 years ago:
    https://www.opengl.org/discussion_bo...X-10000-pixels

    Something new in this regard?

    In particular, we are using OpenGL, and when a device context is drawing to Window (flag PFD_DRAW_TO_WINDOW in dwFlags, pixel format), glGetIntegerv(GL_MAX_TEXTURE_SIZE returns 16384 size.
    But when the context is drawing to Bitmap (flag PFD_DRAW_TO_BITMAP in pixel format), glGetIntegerv(GL_MAX_TEXTURE_SIZE returns only 1024 size.

    Or is there some other reason for this GL_MAX_TEXTURE_SIZE difference?

    Thank you!
    Last edited by Marcin95777; 11-20-2018 at 05:23 AM.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,006
    Quote Originally Posted by Marcin95777 View Post
    I have a question about drawing to large bitmap, something similar to 10k x 10k, what was asked in this thread 15 years ago:
    https://www.opengl.org/discussion_bo...X-10000-pixels

    Something new in this regard?
    As of OpenGL 4.6, GL_MAX_TEXTURE_SIZE, GL_MAX_RENDERBUFFER_SIZE, GL_MAX_FRAMEBUFFER_WIDTH and GL_MAX_FRAMEBUFFER_HEIGHT must all be at least 16384.

    Quote Originally Posted by Marcin95777 View Post
    In particular, we are using OpenGL, and when a device context is drawing to Window (flag PFD_DRAW_TO_WINDOW in dwFlags, pixel format), glGetIntegerv(GL_MAX_TEXTURE_SIZE returns 16384 size.
    But when the context is drawing to Bitmap (flag PFD_DRAW_TO_BITMAP in pixel format), glGetIntegerv(GL_MAX_TEXTURE_SIZE returns only 1024 size.

    Or is there some other reason for this GL_MAX_TEXTURE_SIZE difference?
    I suspect that PFD_DRAW_TO_BITMAP is using the built-in OpenGL 1.1 software renderer.

  3. #3
    Newbie Newbie
    Join Date
    Nov 2018
    Posts
    2
    Quote Originally Posted by GClements View Post
    I suspect that PFD_DRAW_TO_BITMAP is using the built-in OpenGL 1.1 software renderer.
    Yes, that seems to be the case. And this is probably, because we take device context from System.Graphics

    Would there be any way of "cheating" the openGL into using better renderer, despite having PFD_DRAW_TO_BITMAP flag?

    I was also looking into other solution, and there is maybe one on stackoverflow:
    https://stackoverflow.com/questions/...ctly-to-bitmap
    however, it would require significant changes to our code, which I am trying to avoid.

  4. #4
    Intern Newbie
    Join Date
    May 2012
    Posts
    31
    And their answer is still valid 15 years later. Use a tile rendering system and split your bitmap into 1024x1024 blocks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •