Results 1 to 5 of 5

Thread: simple objects

  1. #1
    Guest

    simple objects

    I'm loading a simple array that has vertex data for a cube.
    The origin is (0,0,0) i presume but i have tried hard to get someting to the screen but there has been no success!
    the array is something like this

    point3 points[] = {8273,234,234}..{2i37,435,31)....

    point3 is a stucture with three valuues x,y,z. the numbers are double float (those are not the exact numbers).

    help

  2. #2
    Member Contributor
    Join Date
    Feb 2003
    Location
    Mitishy
    Posts
    59

    Re: simple objects

    how you render them?
    to draw simple points use:
    1. the simples way:
    class point {float x,y,z;} array[50];
    glBegin();
    for(int i =0; i<50; n++) {
    glVertex3fv(&array[n].x);
    }
    glEnd();
    (don't take close to heart)
    2. use vertex arrays
    can't remember right now how to do... sorry
    if you want to draw cube with faces using indices... hey did you check any of NeHe's tutorials(nehe.gamedev.net) - they explain that all...
    i could only say that holding points like you do is not a good way...

  3. #3
    Member Contributor
    Join Date
    Sep 2003
    Location
    Jersey, Channel Islands
    Posts
    66

    Re: simple objects

    What do you mean 'loading' the points? Are you reading them in from a file? Is your data read in correctly before attempting to do any rendering?

    Does your rendering code work for other points/data?

    mad

  4. #4
    Guest

    Re: simple objects

    not loading from a file, but a .cpp file
    with an array of points.

    the rendering code works i checked it

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Bangalore,India
    Posts
    25

    Re: simple objects

    I think a glFlush(); should do the trick.
    You dont seem to be sending the statements for execution.
    Could probably put the code here for better exmination of your problem.
    Yup, that's me!!

Similar Threads

  1. Correct way to draw numerous simple objects
    By silikone in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-14-2019, 06:35 AM
  2. Stereoscopic simple objects
    By Latode in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-17-2016, 05:37 PM
  3. How to create 2 objects? - v simple question
    By MikeBaldock in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-09-2010, 07:26 AM
  4. COLOUR SIMPLE OBJECTS USING GL_LINES ETC.....
    By jtmo321 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-08-2001, 07:54 PM
  5. A simple opengl way to load objects(x, 3ds)?
    By Starnut coder in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 01-24-2001, 06:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean