Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 3d internals.

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    México.
    Posts
    7

    3d internals.

    Dont know if is the correct name for the topic.

    Im a person that like to know first things first (or at less what I think is first), in this case know how OpenGL work and the ideas, algorithms behind OpenGL.

    For this case I have downloaded mesa sources, but dont know where to start. Also I guess that I should read the Specification of OpenGL.

    I will like to know pointers to 3D basic things, ie for construct my own library, pheraphs you think that reinvent the wheel is some thing that should not be done, in my case is nice to at less know how to construct it from scratch.

    also I put a list of things that I will like to know:

    - 3D/2D.
    - Rendering.
    - Data structures.
    - Large Memory management.
    - Engines.
    - Raytracing.
    - Another technique?.
    - Things that should be fun to implement, ie the idea exist, but there no exist actually sucha a thing.

    - IA.
    - Physics.
    - Algorithms, buffers, old techniques (for know when a thing that I imagine is from the past).

    If you have the time for answer all this do it if you whant it, if only a little of this can be answered that will be of help too. I prefer pointers to online sources and online books , but if I should find a book and you say that is a must do, then I will do my best for get it or at less find somewhere.

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: 3d internals.

    If you want to write your own GL library, I don't suggest MESA, unless you are good with poorly documented code.

    Start by learning the basics. Look at GL graphics pipeline, then search web for triangle rasterization, line drawing algorithm, scan converting, digital differential analyzer, Bresenham, Sutherland, midpoint line algorithm, polygon filling, polygon clipping, guard band clipping, spacial aliasing, texture mapping, ...

    If you keep searching, you'll find enough information to fill up a library.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Intern Newbie
    Join Date
    Jan 2002
    Location
    Steamboat Springs, CO, USA
    Posts
    43

    Re: 3d internals.

    I apologize for Mesa's documentation not being as good as you'd like. If there are particular areas that you're interested in, I can try to improve things when I'm working in those areas.

    But remember that lots of people work on the code and not everyone is as inclined to write comments as I am.

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jan 2004
    Location
    Los Angeles, CA, USA
    Posts
    216

    Re: 3d internals.

    What you have described is several semesters worth of material. While it is important to know how OpenGL works at the level of the pipeline, vertices, transforms, fragments, etc., anything below that is implementation specific.

    If you want to look at the Mesa source, have fun, but I suspect you'll have more luck starting with the OpenGL Programming Guide (the red book) which has a good description of the OpenGL state machine.

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    México.
    Posts
    7

    Re: 3d internals.

    Thanks, I will look fordward for the sugestion.

    Also I will be doing the examples of Nehe and reading the books for know how to use it, but yes, I will see how is inside mesa .

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: 3d internals.

    Originally posted by Brian Paul:
    I apologize for Mesa's documentation not being as good as you'd like. If there are particular areas that you're interested in, I can try to improve things when I'm working in those areas.

    But remember that lots of people work on the code and not everyone is as inclined to write comments as I am.
    I document my code by using descriptive names for variables, and also by explaining the use in the comments. I explain the use of classes, functions and how to use them as well.

    I think it could use a flowchart showing how all the parts connect. Mesa is complex enough to warrant standard documenting.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  7. #7
    Intern Newbie
    Join Date
    Jan 2002
    Location
    Steamboat Springs, CO, USA
    Posts
    43

    Re: 3d internals.

    I document my code by using descriptive names for variables, and also by explaining the use in the comments. I explain the use of classes, functions and how to use them as well.

    I do all those things too. Again, if there are particular areas of the code where you need something added, let us know. Perhaps you're looking at code that someone else wrote that didn't have time for a lot of polish. But without you being more specific, I don't know where to look.

    I think it could use a flowchart showing how all the parts connect. Mesa is complex enough to warrant standard documenting.

    I'm afraid I don't have time for flowcharts. "Standard documentation" is rather vague. I think I do a pretty good job with my coding/comments.

    -Brian

  8. #8
    Junior Member Newbie
    Join Date
    Aug 2004
    Location
    México.
    Posts
    7

    Re: 3d internals.

    Is there a option for generate automatically graphs with doxygen, but aparently I need another one tool I will search/find it, but see if have good output.

    What about the others subjects?

    I have finded http://www.faqs.org/faqs/graphics/algorithms-faq/ I guess you know already

    - IA.
    - Physics.
    - Algorithms, buffers, old techniques (for know when a thing that I imagine is from the past).
    - Data structures.
    - Large Memory management.
    - Things that should be fun to implement, ie the idea exist, but there no exist actually sucha a thing.

    If you have a link that can be usefull, also you can put one of the other categories

  9. #9
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: 3d internals.

    Originally posted by Brian Paul:
    I do all those things too. Again, if there are particular areas of the code where you need something added, let us know. Perhaps you're looking at code that someone else wrote that didn't have time for a lot of polish. But without you being more specific, I don't know where to look.
    I was speaking generally because the last time I looked at mesa source has been a few months. I took a look again at 6.2
    I will probably check out the arb vertex/fragment programs more closely when I come back to it.

    The first time I looked at mesa, was probably during 2.x, and I remember trying to figure out where vertices go in (glVertex3f) and where pixels come out. I couldn't, so I tried to locate algorithms typical of GL, like texgen, matrix multiplcation and so on.

    Unrelated to the above :
    Do you think that the current software Mesa is as optimized as it could be?
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  10. #10
    Intern Contributor
    Join Date
    Jan 2003
    Location
    Wisconsin
    Posts
    64

    Re: 3d internals.

    If by IA you mean AI (artificial intelligence), then I think the best way to learn that is to take a class. Unless someone else can think of some wonderful book or online article that I'm not aware of, I think the best way to learn it is to have contact with a teacher or professor who is knowledgable in the subject. That doesn't have a whole lot to do with OpenGL, though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •