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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:29:49+00:00 2026-05-28T13:29:49+00:00

I get this strange distorted primitive shape (instead of a square) when i move

  • 0

I get this strange distorted primitive shape (instead of a square) when i move the primitive through the x and y co-ordinates.

Here is a snapshot:
http://img535.imageshack.us/img535/9046/screenshot20120126at122.png

I’m using orthogonal projection since i want to render in 2D.

Here is the render code:

//vertex definition
static GLfloat qdt[] = {
    30.0f, 60.0f, -0.03f,
    30.0f, 30.0f, -0.03f,
    60.0f, 60.0f, -0.03f,
    60.0f, 30.0f, -0.03f
};

//clear buffers
glClear(GL_COLOR_BUFFER_BIT);// also tried using GL_DEPTH_BUFFER_BIT

//load matrices
glLoadIdentity();

//drawing
glVertexPointer(3, GL_FLOAT, 0, &qdt[0]);
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 12);

//swap buffers
[glContext presentRenderbuffer:GL_RENDERBUFFER_OES];

I’ve disabled the depth buffers too.
It would be nice if someone points out the mistakes which is causing this distortion.
Thanks in advance.

  • 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-28T13:29:50+00:00Added an answer on May 28, 2026 at 1:29 pm

    Replace 12 by 4, because you draw 4 vertices:

    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Entity Framework, I suddenly get this strange error after publishing my asp.net mvc
This might seam like a strange question but.... public string MyProperty { get {
I get this strange linker error: ld: in /Users/.../test project/iSMP.framework/iSMP, file too small for
When using this class I get this strange exception. It is used to print
I created a Hello world app but get this strange error: The project cannot
I'm making a TCP Client in Applet mode and I get this strange error...
When using wx.TextCtl with the wx.TE_RICH2 option in windows, I get this strange bug
Grails 1.3.7 I get this strange error when I try to invoke my named
I get this strange error if I use a link_to with the :remote =>
I just prepare small update for my android app, but I get this strange

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.