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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:20:26+00:00 2026-06-13T14:20:26+00:00

I had some 3D code that I noticed wouldn’t render in a strict core

  • 0

I had some 3D code that I noticed wouldn’t render in a strict core profile but fine in a “normal” (not explicitly requested-as-core-only) profile context. To isolate the issue, I have written the smallest simplest possible OpenGL program drawing just a triangle and a rectangle:

enter image description here

I have posted that OpenGL program as a Gist here.

With the useStrictCoreProfile variable set to false, the program outputs no error messages to the console and draws a quad and a triangle as per the above screenshot, both on an Intel HD OpenGL 3.3 and on a GeForce with OpenGL 4.2.

However, with useStrictCoreProfile set to true, it clears the background color but does not draw the tri & quad, console output is this:

GLCONN: OpenGL 3.2.0 @ NVIDIA Corporation GeForce GT 640M LE/PCIe/SSE2 (GLSL: 1.50 NVIDIA via Cg compiler)
LASTERR: OpenGL error at step 'render.VertexAttribPointer()': GL_INVALID_OPERATION
LASTERR: OpenGL error at step 'render.DrawArrays()': GL_INVALID_OPERATION
LASTERR: OpenGL error at step 'render.VertexAttribPointer()': GL_INVALID_OPERATION
LASTERR: OpenGL error at step 'render.DrawArrays()': GL_INVALID_OPERATION
LASTERR: OpenGL error at step '(post loop)': GL_INVALID_OPERATION
EXIT

… if a 4.2 strict core profile is requested instead of 3.2, same issue. Applies to 3 different nvidia GPUs so I assume I’m not conforming to the strict core profile properly. What was I doing wrong, and how can I fix this?

Note, you won’t find a glEnableVertexAttribArray call in the above Gist, as it’s inside the glutil package I’m importing — but this does get called as the last step in the gist’s compileShaders() func.

  • 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-13T14:20:28+00:00Added an answer on June 13, 2026 at 2:20 pm

    You’re not creating/binding a Vertex Array Object with glGenVertexArrays() and glBindVertexArray(). VAOs encapsulate a bunch of vertex attribute state, including which attributes are enabled, detailed per-attribute information, etc. They were optional when the feature was originally introduced, but they’re now required in strict/core contexts according to section 10.4 of the OpenGL core specification:

    An INVALID_OPERATION error is generated by any commands which
    modify, draw from, or query vertex array state when no vertex array is bound.
    This occurs in the initial GL state, and may occur as a result of BindVertexArray or a side effect of DeleteVertexArrays.

    Here’s a very rough example of how VAOs are used:

    // At initialization time:
    GLuint vao = 0;
    glGenVertexArrays(1, &vao);
    glBindVertexArray(vao);
    // Set up your vertex attribute state:
    //  - glBindBuffer(GL_ARRAY_BUFFER,...);
    //  - glEnableVertexAttribArray(...);
    //  - glVertexAttribPointer(...);
    //  - etc. -- Refer to OpenGL docs to see what is/isn't included in the VAO!
    glBindVertexArray(0); // unbinds vao
    
    // At draw time:
    glBindVertexArray(vao); // automatically sets up previously-bound vertex attribute state
    glDrawArrays(...);
    glBindVertexArray(0); // unbinds vao
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking at some code I noticed that another dev had changed every instance of
I had some code that constructed an object: function gridObjConst(id, itemName, itemPrice, itemListPrice, width,
I had some code that ran commands through Runtime.getRuntime.exec(String) , and it worked on
I had some decryption code (using wincrypt.h ) that lived within my FileReader.cpp class.
A co-worker asked about some code like this that originally had templates in it.
I had never noticed the __path__ attribute that gets defined on some of my
This is Delphi 2009, so Unicode applies. I had some code that was loading
I noticed that some of my gzip decoding code seemed to be failing to
This question has two parts. Part 1. Yesterday I had some code which would
I had to convert some code (which deals with building a VBO of data

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.