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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:13:16+00:00 2026-06-13T05:13:16+00:00

I have been trying to make an asteroids clone using openGL and have gotten

  • 0

I have been trying to make an asteroids clone using openGL and have gotten totally stuck on a segmentation error I am unsure how to fix. It seems to happen on the usage of the function glGenBuffersARB(). If I comment out the lines using the vertexbuffer, the program compiles and runs fine (but obviously with nothing rendered). I am using the minGW compiler on eclipse with the gdb debugger and trying to use extensions so I can support versions of OpenGL earlier than 1.5.

glGenBuffers(1, &_VertexBufferObject);

glBindBufferARB( GL_ARRAY_BUFFER_ARB, _VertexBufferObject ); // Bind The Buffer

glBufferDataARB( GL_ARRAY_BUFFER_ARB, U8VertexCount*3*sizeof(GLfloat), quad,GL_STATIC_DRAW_ARB );

GLuints are declared as private in a header like this:

GLuint _VertexArrayObject;

GLuint _VertexBufferObject;

int U8VertexStride;

int U8VertexCount;

gdb traces are here: gdb trace

  • 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-13T05:13:17+00:00Added an answer on June 13, 2026 at 5:13 am

    I have found a solution to the problem. It would appear that declaring and using an object was not working the way I had intended. I was declaring the objects as:
    CObj Obj;
    and calling draw like this:
    Obj.Draw();
    when I switched to declaring it as a pointer:
    CObj * Obj;
    and initialising it like this:
    Obj = new CObj();
    then using:
    Obj->Draw();
    started to work as i thought it should. I am unsure why this is the case and would appreciate it if anyone is able to clear this up for me.

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

Sidebar

Related Questions

I have been trying to make an init script using start-stop-daemon. I am stuck
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have been trying to make graphs using the igraph library in c. I
Using MVC 2 I have been trying to make this record store project. Creating
I have been trying to make a Pong clone as sort of a beginner's
I have been trying to make a Pong clone as sort of a beginner's
I've been trying to make an AI for an asteroids game but have become
I have been trying to make a simple Spring project using Eclipse and Maven
I have been trying to make a case for using Python at my work.
i have been trying to make a clone of a database with out 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.