Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6543993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:24:46+00:00 2026-05-25T11:24:46+00:00

When does OpenGL actually draw things I instruct it to? is it on the

  • 0

When does OpenGL actually draw things I instruct it to? is it on the call to the specific drawing function or on the buffer swap?
I want to know this to see if I can do something like this:

SomeTimer Timer;

Timer.Start();
glDrawArrays(...);
long time = Timer.Stop();

To see what drawing takes the most time and optimize based on that.
If it matters: I’m drawing only in 2d, no stencil/depth or any other buffer tests.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:24:46+00:00Added an answer on May 25, 2026 at 11:24 am

    That code will not work. OpenGL commands are by definition assumed to be asynchronous in behavior. GL commands are required to have fully written to or read from any parameters before they complete. But outside of that, all bets are off.

    Timing any individual glDraw* call will tell you only how much time it takes that function call to complete. It says nothing about how long the rendering takes to finish.

    A more thorough discussion of this subject is available.

    The upside is that you can time rendering, but you have to do it OpenGL’s way. ARB_timer_query allows you to do exactly that: time how long it takes for OpenGL commands to complete, not merely be given to OpenGL. This extension is core in OpenGL 3.3, and it is pretty widely available for various levels of hardware. Pretty much any GPU still being supported by its owner implements this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how I can achieve the following effect in OpenGL: Change the
I'm making a drawing application with WINAPI and OpenGL. To make things more efficient
I know that if the OpenGL implementation does not find a suitable driver it
I want to make ball collision with camera bounds. Does OpenGL ES api have
Does anyone have experience writing professional OpenGL games on Windows? For the Mac, due
I am working on OpenCL. Does anyone know of a good debugger for OpenCL
Does anybody know any good resources for learning how to program CIL with in-depth
Does anyone know how to get IntelliSense to work reliably when working in C/C++
I have a VB6 application (please don't laugh) which does a lot of drawing
Does OpenGL ES 2.0 still support glPushMatrix and glPopMatrix? I'm currently using these in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.