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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:54:40+00:00 2026-05-23T19:54:40+00:00

I use glDrawArrays(GL_POINTS,…) to draw harmonic wave. I would like to know the order

  • 0

I use glDrawArrays(GL_POINTS,…) to draw harmonic wave.
I would like to know the order in which the surfaces (triangles?) are generated by openGL while rendering based on the vertices
and in such a way calculate the surface area?
Can I do it and if yes how.


I will try to explain it better

I have 2D array of values and perform uv-mapping on it.( i generate harmonic wave)
and draw the surface accepted using glDrawArrays.
I want to calculate the surface area,which i visualize.
I think I should “translate” the problem to be easier for such calculation by creating a grid of triangles ,
which is suitable for points drawing – this will simplify my calculation.

  • 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-23T19:54:41+00:00Added an answer on May 23, 2026 at 7:54 pm

    I use glDrawArrays(GL_POINTS,…) to draw harmonic wave.

    Points have no surface.

    I would like to know the order in which the surfaces (triangles?) are generated by openGL while rendering based on the vertices and in such a way calculate the surface area? Can I do it and if yes how.

    OpenGL doesn’t generate traiangles. It rasterizes the triangles you send it. In the very same order in which you specify them. glDrawArrays(mode, first, count) behaves exactly like

    myDrawArrays(GLenum mode, GLuint first, GLuint count)
    {
        GLuint *indices = malloc(count * sizeof(GLuint));
        /* just assume malloc never fails, OpenGL doesn't have to alloc here, of course) */
        for(int i=0; i<count; i++)
            indices[i] = first + i;
        glDrawElements(mode, count, GL_UNSIGNED_INT, indices);
        free(indices);
    }
    

    The primitives are rasterized in the order they are specified.

    So you want to know a surface area, but are drawing points. As already told, points (mathematically) have no surface. However they cover at least one (sub-)pixel. So could it be that you actually want to know the pixel coverage?

    Then OpenGL provides you a method called “occlusion query” using which it returns you, how many (screen/framebuffer) pixels got touched by drawing the primitives within the query.

    http://www.opengl.org/registry/specs/ARB/occlusion_query.txt

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

Sidebar

Related Questions

Normally, you'd use something like: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_LINE_SMOOTH); glLineWidth(2.0f); glVertexPointer(2, GL_FLOAT, 0, points);
How can I use OpenGLES 1.1 (iPhone) to draw a texture, but only using
Use: The user searches for a partial postcode such as 'RG20' which should then
Use trap to capture signals like this: i=-1;while((++i<33)); do trap echo $i >> log.txt
Use case: we have some project meta-data files which we want tracked, but are
I have 4 dimensional vertices(X,Y,A,B) that I'd like to draw as 6 separate 2D
I would like to render image in OpenGL ES, pixel by pixel. I want
Use Case Show a photo uploaded by the user in a square box with
use C#,want to upload excel file on google doc. bellow syntax use to upload
use Text::Table; my $tb = Text::Table->new(Planet,Radius\nkm,Density\ng/cm^3); $tb->load( [ Mercury,2360,3.7], [ Mercury,2360,3.7], [ Mercury,2360,3.7], );

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.