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 8887241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:45:29+00:00 2026-06-14T21:45:29+00:00

The OpenGL docs for glUseProgram claim that calling it with an argument of zero

  • 0

The OpenGL docs for glUseProgram claim that calling it with an argument of zero will cause the results of shader execution to be undefined.

However, after a little searching I’ve seen a couple examples of people using glUseProgram to uninstall the current shader program.

Is this behavior reliable? If not, then what exactly does glUseProgram(0) do?

  • 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-06-14T21:45:30+00:00Added an answer on June 14, 2026 at 9:45 pm

    glUseProgram means that the given program object is the current program that will be used for things that use programs (glUniform, rendering commands, etc). 0 is a lot like NULL for OpenGL objects. It represents not an object (for most objects). Therefore, glUseProgram(0) means that no program is current, and therefore no program will be used for things that use programs.

    If you attempt to call the glUniform functions when no program is current, they will fail with an error. If you attempt to render when no program is current, one of two things will happen. In OpenGL 3.1+, core profile, you will get undefined behavior, because core OpenGL must render with a program. In compatibility profiles or version 3.0 or less, you will get fixed-function rendering.

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

Sidebar

Related Questions

I notice that the default data type for texture coordinates in the OpenGL docs
In the docs for OpenGL ES 2.0 on Android , it states: Caution: OpenGL
Using OpenGL ES I am rendering a simple cube class that draws it at
I am building an iOS game with OpenGL ES 2.0 that contains a scene
Does version OpenGL 3+ only uses GL_TRIANGLES ? That's what I read, but in
The OpenGL documentation say that the gluLookAt() calls should be done on the GL_MODELVIEW
Does OpenGL/OpenGLES VBO hold only same size vertex? I'm asking because i found that
For OpenGL. There are many texture loaders that I could use, but what are
Apples docs state: You should avoid creating UIImage objects that are greater than 1024
I'm following these docs and trying to set OpenGL version to 1.1. But when

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.