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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:38:37+00:00 2026-05-15T12:38:37+00:00

I’m new to OpenGL and graphics programming in general, though I’ve always been interested

  • 0

I’m new to OpenGL and graphics programming in general, though I’ve always been interested in the topic so have a grounding in the theory.

What I’d like to do is create a scene in which a set of objects move about. Specifically, they’re robotic soccer players on a field. The objects are:

  • The lighting, field and goals, which don’t change
  • The ball, which is a single mesh which will undergo translation and rotation but not scaling
  • The players, which are each composed of body parts, each of which are translated and rotated to give the illusion of a connected body

So to my GL novice mind, I’d like to load these objects into the scene and then just move them about. No properties of the vertices will change, either their positioning nor texture/normals/etc. Just the transformation of their ‘parent’ object as a whole.

Furthermore, the players all have identical bodies. Can I optimise somehow by loading the model into memory once, then painting it multiple times with a different transformation matrix each time?

I’m currently playing with OpenTK which is a lightweight wrapper on top of OpenGL libraries.

So a helpful answer to this question would either be:

  • What parts of OpenGL give me what I need? Do I have to redraw all the faces every frame? Just those that move? Can I just update some transformation matrices? How simple can I make this using OpenTK? What would psuedocode look like? Or,
  • Is there a better framework that’s free (ideally open source) and provides this level of abstraction?

Note that I require any solution to run in .NET across multiple platforms.

  • 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-15T12:38:38+00:00Added an answer on May 15, 2026 at 12:38 pm

    Using so called vertex arrays is probably the surest way to optimize such a scene. Here’s a good tutorial:

    http://www.songho.ca/opengl/gl_vertexarray.html

    A vertex array or more generally, a gl data array holds data like vertex positions, normals, colors. You can also have an array that hold indexes to these buffers to indicate in which order to draw them.
    Then you have a few closely related functions which manage these arrays, allocate them, set data to them and paint them. You can perform a rendering of a complex mesh with just a single OpenGL command like glDrawElements()

    These arrays generally reside on the host memory, A further optimization is to use vertex buffer objects which are the same concept as regular arrays but reside on the GPU memory and can be somewhat faster. Here’s abit about that:

    http://www.songho.ca/opengl/gl_vbo.html

    Working with buffers as opposed to good old glBegin() .. glEnd() has the advantage of being compatible with OpenGL ES. in OpenGL ES, arrays and buffers are the only way to draw stuff.

    — EDIT

    Moving things, rotating them and transforming them in the scene is done using the Model View matrix and does not require any changes to the mesh data. To illustrate:

    you have your initialization:

    void initGL() {
      // create set of arrays to draw a player
      // set data in them
      // create set of arrays for ball
      // set data in them
    }
    
    void drawScene {
      glMatrixMode(GL_MODEL_VIEW);
      glLoadIdentity();
      // set up view transformation
      gluLookAt(...);
      drawPlayingField();
    
      glPushMatrix();
      glTranslate( player 1 position );
      drawPlayer();
      glPopMatrix();
    
      glPushMatrix();
      glTranslate( player 2 position );
      drawPlayer();
      glPopMatrix();
    
      glPushMatix();
      glTranslate( ball position );
      glRotate( ball rotation );
      drawBall();
      glPopMatrix();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
I have some data like this: 1 2 3 4 5 9 2 6
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace

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.