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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:37:46+00:00 2026-05-26T07:37:46+00:00

this is probably a pretty basic question but I can’t seem to get OpenGL

  • 0

this is probably a pretty basic question but I can’t seem to get OpenGL to work with a point coordinate system. Instead it seems to be in percents, for example .99 puts me right at the edge of the screen. Is this how it is, or am I doing something wrong? Thanks!

code used:

#include <iostream>
#include <stdlib.h>
#include <GLUT/GLUT.h>

void RenderScene()
{
    glLoadIdentity (); 
    glClear(GL_COLOR_BUFFER_BIT);

    glBegin( GL_POINTS );  

        glVertex3f( 0, 0, 0 );

    glEnd();


    glFlush();  
}

int main(int argc, char **argv)
{
    glutInit( &argc, argv );                
    glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );        
    glutInitWindowSize( 600, 600 );        
    glutCreateWindow( "OpenGL" );   
    glutDisplayFunc( RenderScene );
    glutMainLoop();
    return 0;
}
  • 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-26T07:37:46+00:00Added an answer on May 26, 2026 at 7:37 am

    OpenGL works in the following way: You start of a local coordinate system (of arbitrary units). This coordinate system is transformed to so called eye space coordinates by the model-view matrix (it is called model-view matrix, because it combines model and view transformations).

    The eye space is then transformed to clip space by the projection matrix, immediately followed by the perspective divide to obtain normalized device coordinates ( NDC{x,y,z} = Clip{x,y,z}/Clip_w ). The range [-1,1]^3 in NDC space is mapped to the viewport (x and y) and the set depth range (z).

    So if you leave your transformation matrices (modelview and projection) identity, then indeed the coordinate ranges [-1,1] will map to the Viewport. However by choosing appropriate transformation and projection you can map from Model Space units to Viewport units arbitrarily.

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

Sidebar

Related Questions

This is probably a pretty basic question, but just something that I wanted to
This is probably pretty basic, but I'm trying to find out how I can
This is probably a pretty basic question, but just something that I wanted to
This is probably pretty simple, but I can't figure out how to do it:
This is probably a really newbie question (well, I'm pretty sure it is), but
This is probably pretty basic, but to save me an hour or so of
This is probably pretty basic, but I'm trying to figure out how to show
So this question is probably pretty basic. I am wanting to create an array
OK, this is probably pretty basic stuff, but it took me quite some time
This is probably pretty basic, but I'm a beginner in PHP - I have

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.