Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: Brokenmind

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    265

    Do you simply want to draw your horse no matter...

    Do you simply want to draw your horse no matter what (as a picture), or do you explicitly want to convert it into lines and draw them afterwards? I'm afraid the latter is no easy task and I have no...
  2. Replies
    5
    Views
    265

    The general syntax is: glBegin(GL_LINES) or...

    The general syntax is:

    glBegin(GL_LINES) or (GL_LINE_STRIP) or (GL_LINE_LOOP);
    glVertex2f(x, y) or glVertex3f(x, y,z);
    ...
    glEnd();
    You can look for what best suits your needs here (look at...
  3. Replies
    5
    Views
    227

    You're right, I forgot to mention that each of...

    You're right, I forgot to mention that each of the tests that was done with the triangle edges and the quad must also be done with the quad edges and the triangle.

    The intersection would be a...
  4. Replies
    5
    Views
    227

    First, you need to better define what you need....

    First, you need to better define what you need. The intersection of a triangle and a bounding box rarely has only one point; most of the times, its an edge.

    In case you do this without predefined...
  5. Replies
    1
    Views
    135

    The modelviewprojected vector needs to have its w...

    The modelviewprojected vector needs to have its w set to 1. After a projection, this w is usually something different, as well as the xyz part, and dividing this by w sort of normalises the vector.
    ...
  6. As for the last question, it has an easy answer:...

    As for the last question, it has an easy answer:
    You assign the function's return value to an unsigned int, which doesn't have a sign (duh). It isn't returning (int)-1 but (uint)4294967295, which is...
  7. You might get a much faster solution to your...

    You might get a much faster solution to your problem if you could post the relevant code snippets here, searching through over 1000 LOC is a little tedious :) and you might have as well made a typo...
  8. Replies
    2
    Views
    200

    I assume that most elements in your game are...

    I assume that most elements in your game are static, so they don't (or hardly) change at all. The general procedure would be this:
    Assign data to them space-efficiently, so if you have 10000...
  9. Replies
    5
    Views
    288

    A bit of search resulted in this...

    A bit of search resulted in this and this posting. Although they're both for iphone, the functions they use also exist in the normal openGL, namely glBlendEquation and glBlendEquationSeparate. You...
  10. Replies
    2
    Views
    262

    You have one mistake there: The matrix does not...

    You have one mistake there: The matrix does not take the target point, but the target direction. So your target vector need actually be (0, -500, 0)^T.
    If you try to look with the front direction of...
  11. Unfortunately, I'm not familiar with uniform...

    Unfortunately, I'm not familiar with uniform buffer objects, but I have a different approach that could work for you:

    With what I coded so far, I found out that shaders seem to have a problem with...
  12. Usually, these two lines should do the trick: ...

    Usually, these two lines should do the trick:



    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    And yes, this is blending because otherwise, the white background...
  13. Two possibilities: Use negative texture...

    Two possibilities:
    Use negative texture coordinates, so 00, 01, -11, -10. For this, you have to activate the GL_REPEAT parameter, otherwise the image will be plain black as valid coordinates have...
  14. Replies
    6
    Views
    465

    You don't mean this, do you?...

    You don't mean this, do you?
    http://www.mariowiki.com/images/2/29/SpecialZone_SMW.png
    But seriously, you should specify your problem more clearly. And even if you cannot post URLs here, remove the...
  15. Replies
    5
    Views
    547

    You should be able to figure out the basic theory...

    You should be able to figure out the basic theory behind it yourself!

    I hope I interpreted your task right because otherwise, the stuff below was for nothing.

    Code untested (I only made sure it...
  16. This assignment covers way too many features to...

    This assignment covers way too many features to be addressed in a single post, and I'm sure the person who gave you the assignment provided you with a basic openGL program. I'll just give you hints...
  17. A test image like the above one? I'm afraid it's...

    A test image like the above one? I'm afraid it's from Google ;) But there's an image for everything: Here, for example. I do have selfwritten code for such a sphere, but no project to display it atm....
  18. If you have few points which are unevenly...

    If you have few points which are unevenly distributed and form a convex geometry around the center of the imaginary sphere, you could extrapolate the values to map a sphere and assign the color...
  19. Replies
    2
    Views
    349

    In openGL, the projection will be performed...

    In openGL, the projection will be performed either with perspective or with parallel projection, which internally are glFrustum or glOrtho. But still, in order to tell openGL how you want to look at...
  20. Replies
    3
    Views
    284

    You need to draw it before you do the...

    You need to draw it before you do the transformation that affects the rest of the scene (so right after you load the identity matrix). Then, the screen space goes from (-1, -1) to (1, 1),
  21. Replies
    2
    Views
    297

    I hope you mean gluLookAt. The code is here: ...

    I hope you mean gluLookAt. The code is here:



    void GLAPIENTRY
    gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx,
    GLdouble centery, GLdouble centerz, GLdouble upx,...
  22. You got me; I've never done sphere mapping before...

    You got me; I've never done sphere mapping before and thus am not familiar with the coordinate conversion.

    If the creation of the texture is computationally efficient, then this is no problem. My...
  23. I'm not familiar with openGL ES but I hope you...

    I'm not familiar with openGL ES but I hope you can use shaders there, because then this will be an easy task:
    You simply need to compute the distance between the geometry you draw and the camera,...
  24. If you only have scattered points on the sphere's...

    If you only have scattered points on the sphere's surface, there is no need for shaders. They work best if you have a mathematical description for the function you want to show, which I thought you...
  25. Replies
    4
    Views
    466

    I misinterpreted the isometric keyword... but...

    I misinterpreted the isometric keyword... but could you add a screenshot of what you have achieved so far?

    The information are interpreted in the vertex shader.
    Let's say for simplicity that the...
Results 1 to 25 of 63
Page 1 of 3 1 2 3