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: -Mil0-

Search: Search took 0.00 seconds.

  1. Replies
    12
    Views
    1,826

    Re: Confusing problem with drawing first primitive

    Heh, see, this is exactly why I'm allergic to java.

    Anyway, I'm glad you managed to solve this (persistence is half the battle).
  2. Replies
    12
    Views
    1,826

    Re: Confusing problem with drawing first primitive

    Sorry I couldn't be more helpful.

    Anyway, be sure that your viewport dimensions match your screen size. So, if you have a 640x480 window, you should call glViewport(0, 0, 640, 480) - all my advice...
  3. Replies
    12
    Views
    1,826

    Re: Confusing problem with drawing first primitive

    Well, wait. You said that your program "once in a while gets a triangle drawn on screen" (in your initial post) - so, what was the code that actually worked?

    I would start from there.

    Also, I...
  4. Replies
    12
    Views
    1,826

    Re: Confusing problem with drawing first primitive

    This is your triangle in 2D space (according to the code snippet you posted above):
    [(0.0, 0.0), (-1.0, -1.0), (0.75, 0.75)]

    Here's what the viewport coordinate system looks like:



    ...
  5. Replies
    12
    Views
    1,826

    Re: Confusing problem with drawing first primitive

    I think that in order for the triangle to render, it has to have a surface area that would fill some pixels on the screen.

    The vertex data in your code describes a triangle with 3 points that rest...
  6. Replies
    5
    Views
    4,967

    Re: Why is gl3.h necessary?

    Ah, I see. Thanks for clearing that up.
  7. Thread: Draw an arc

    by -Mil0-
    Replies
    7
    Views
    1,673

    Re: Draw an arc

    Well, as the error clearly states, and as AlealactaEst already pointed out, the pointer returned by malloc cannot be converted automatically, so you have to do it yourself.

    I'm on Linux, using...
  8. Replies
    5
    Views
    4,967

    Re: Why is gl3.h necessary?

    So, it's not so much about new functions, as it is about breaking the old ones?



    Yea, well, that's really what I'm asking: If GLEW makes gl3.h irrelevant (in terms of available features - where...
  9. Replies
    5
    Views
    4,967

    Why is gl3.h necessary?

    Probably a silly question for an experienced OpenGL developer, but this is a beginners forum (and I am a beginner - more or less), so I guess it's the right place to ask.

    I mean, this is the first...
  10. Thread: Draw an arc

    by -Mil0-
    Replies
    7
    Views
    1,673

    Re: Draw an arc

    One way to do it is to simply generate a number of vertices positioned on the arc, and then draw lines between them using glDrawArrays(GL_LINE_STRIP, ...).

    Here's a quick function I whipped up to...
  11. Replies
    1
    Views
    1,129

    Re: passing coordinates from mouse clicks

    Draws the polygon where?

    If you were just looking to draw in the top-down view, you have to derive OpenGL coordinates from your mouse coordinates.

    So, if you have a 640x480 viewport, where the...
Results 1 to 11 of 11