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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:48:01+00:00 2026-05-31T21:48:01+00:00

I am trying to create some simple polygons in openGL3.3. I have 2 types

  • 0

I am trying to create some simple polygons in openGL3.3. I have 2 types of objects with the following properties :

Object 1 – 10 vertices (listed below, in order) stored in GL_ARRAY_BUFFER and use GL_TRIANGLE_FAN

v x y z w  
v 0.0 0.0 1.0 1.0  
v 0.0 1.0 0.1 1.0  
v 0.71 0.71 0.1 1.0  
v 1.0 0.0 0.1 1.0  
v 0.71 -0.71 0.1 1.0  
v 0.0 -1.0 0.1 1.0  
v -0.71 -0.71 0.1 1.0  
v -1.0 0.0 0.1 1.0  
v -0.71 0.71 0.1 1.0  
v 0.0 1.0 0.1 1.0  

Object 2 – 4 vertices (listed below, in order) stored in GL_ARRAY_BUFFER and use GL_TRIANGLE_STRIP

v x y z w  
v 0.0 0.0 0.0 1.0  
v 0.0 1.0 0.0 1.0  
v 1.0 0.0 0.0 1.0  
v 1.0 1.0 0.0 1.0  

I load 64 Object1’s and 4 Object2’s. The Object2’s are scaled using glm::scale(20, 20, 0).

When I try to render these with GL_CULL_FACE disabled but GL_DEPTH_TEST enabled with glDepthFunc(GL_LESS) everything works fine. As soon as I try to enable GL_CULL_FACE all I get is a blank window.

Some other useful information :
– Rendering order = 4 Object2’s followed by 64 Object1’s
– Camera – glm::lookAt(glm::vec3(0.0f, 0.0f, 50.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));
– Perspective – glm::perspective(45.0f, 16.0f / 9.0f, 0.01f, 1000.0f);

I have been trying to figure out why GL_CULL_FACE doesn’t work for the past couple of days but have no idea. Any help is much appreciated.

  • 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-31T21:48:03+00:00Added an answer on May 31, 2026 at 9:48 pm

    This is almost always due to polygon normal direction (right-hand rule of the three vertices of each triangle)

    Try switching the direction using:

    glCullFace(GL_BACK or GL_FRONT)

    Some more reading here

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

Sidebar

Related Questions

I am trying to create a program that will do some simple calculations, but
I'm trying to create a simple Java app that uses JNI to call some
I'm trying to create a simple example of an editable gridview, and for some
I am new to XML and have been trying some simple examples and they
Hello I am trying to create some simple pagination, but my php skills are
Im new to symfony and have some simple questions. I am trying to understand
I'm trying to create some application that connects to blue tooth devices. A simple
I'm trying to make a simple 2D editor with the following capabilities: Create/delete rectangles,
I am trying to learn Hibernate and I could create some simple CRUD operation
Trying my hand at some simple firefox extensions... I am trying to create a

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.