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

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. If you need to perform your own context...

    If you need to perform your own context management, GLFW is of no use to you. SDL and SFML allow you to manage contexts directly, as do more general GUI libraries such as Qt. Or you could just use...
  2. Replies
    8
    Views
    403

    No. Orthographic projections generate a depth...

    No. Orthographic projections generate a depth value which is proportional to Z. Only perspective projections generate a depth value which is inversely proportional to Z.

    And the projection matrix...
  3. Replies
    2
    Views
    281

    What makes branching "costly" is that the GPU...

    What makes branching "costly" is that the GPU typically executes both branches.

    Modern GPUs can actually skip over one of the branches if the condition is the same for all invocations within a...
  4. Replies
    10
    Views
    718

    IOW, you're just making every vertex unique...

    IOW, you're just making every vertex unique whether it's necessary or not, which will result in your data being several times larger than it needs to be (typical figures are 6-fold for triangle...
  5. Replies
    10
    Views
    718

    The OBJ format has a list of vertex coordinates,...

    The OBJ format has a list of vertex coordinates, a list of texture coordinates, a list of normals, and a list of faces where each vertex is defined as indices into each of the arrays, i.e. a vertex...
  6. Replies
    8
    Views
    666

    I wouldn't. Either generate the matrices yourself...

    I wouldn't. Either generate the matrices yourself (the actual matrices used for each function are given in the OpenGL 2.1 reference) or use GLM.

    In the compatibility profile, you can access the...
  7. Replies
    9
    Views
    644

    The basic concept is known as "Single...

    The basic concept is known as "Single Instruction, Multiple Data" or "SIMD", also known as "vector processing".

    Each value in your program is actually an array (vector) of many such values. Any...
  8. Probably. In particular, (s + 1) should...

    Probably.

    In particular, (s + 1) should probably be (s + 1) % NumberOfSectors, so that the last vertex on each ring is connected to the first vertex on that ring, rather than to the first vertex...
  9. It implies that the function which "extracts" the...

    It implies that the function which "extracts" the angles from a matrix does so assuming that order.

    If you used a different order, you'd need a different extraction function.
  10. Replies
    17
    Views
    4,605

    Unfortunately, "hello world" programs aren't the...

    Unfortunately, "hello world" programs aren't the priority. As software becomes more complex, the overhead of the "boilerplate" becomes proportionally less significant.


    While the compatibility...
  11. Replace min() with something else, e.g. ...

    Replace min() with something else, e.g.


    dist = min(min(distVerticalLine, distHorizontalLine), distVerticalLine*distHorizontalLine/radius);
  12. . Poor-man's compute shader: 1. Create two...

    .
    Poor-man's compute shader:

    1. Create two textures of the same size and format, large enough to hold all of your data.
    2. Upload your data into one texture, and bind it to a texture unit (with...
  13. Replies
    2
    Views
    858

    The 945 only supports OpenGL 1.4. IIRC, the 965...

    The 945 only supports OpenGL 1.4. IIRC, the 965 (X3100) was the first Intel chip to support 2.0.
  14. If you don't know, we certainly don't. Which...

    If you don't know, we certainly don't.

    Which system are you trying to generate an executable for? Android? It's some form of ARM-based system (that much is obvious from the fact that the C++...
  15. Replies
    8
    Views
    1,332

    You're aware that RGBA32UI is 32 bits per...

    You're aware that RGBA32UI is 32 bits per component, so 128 bits (16 bytes) per pixel, right? I've seen people assume that it meant 32 bits per pixel.



    This should work. You could also try...
  16. You use the index array which you generate at the...

    You use the index array which you generate at the same time as the vertex positions.


    This generates a cylindrical mesh of (rings-1)*sectors quads.

    The indices can be generated as:


    int...
  17. Hang on a minute ... Are you trying to...

    Hang on a minute ...

    Are you trying to cross-compile an OpenGL program?

    If so, you need to either cross-compile all of the libraries which it uses, or install pre-compiled versions for the...
  18. One option would be to use buffer variables with...

    One option would be to use buffer variables with the atomicMin() and atomicMax() functions.

    Another option would be to use a compute shader (or the poor-man's compute shader: a fragment shader...
  19. Replies
    3
    Views
    828

    1. Store the data as a 2D array and render it as...

    1. Store the data as a 2D array and render it as a texture, not as individual points.

    2. If you're rendering many primitives, use vertex arrays (glDrawArrays etc) rather than glBegin/glEnd. Modern...
  20. Replies
    6
    Views
    1,187

    The output buffer(s) must be distinct from any...

    The output buffer(s) must be distinct from any input buffers; you can't modify vertices in-place. There's no reason why you couldn't use triple-buffering, although I can't think of any situation...
  21. Blending alone won't work, as it can't tell the...

    Blending alone won't work, as it can't tell the difference between what is the "background" and what is the "overlapping shapes".

    You can use the stencil buffer to keep track of which parts have...
  22. Replies
    1
    Views
    534

    You don't. If you want to use shaders, use OpenGL...

    You don't. If you want to use shaders, use OpenGL for rendering, instead of SDL.

    If you just want to perform post-processing on a rendered scene, you can use SDL to render into an SDL_Texture,...
  23. OpenGL uses column-major order by default (the...

    OpenGL uses column-major order by default (the "transpose" versions of functions use row-major order). OpenCV uses row-major order by default, but can use column-major order (the stride or step for...
  24. Replies
    4
    Views
    1,274

    No; there are 801 edges "around" 800 pixels....

    No; there are 801 edges "around" 800 pixels. There is an edge before the first pixel, after the last pixel, and between each pair of adjacent pixels.


    You're conflating coordinates with...
  25. Replies
    2
    Views
    756

    One option is to create a 21x11 grid of blocks...

    One option is to create a 21x11 grid of blocks (i.e. large enough to fill the screen regardless of the alignment of the block grid relative to the screen) consisting of constant data, and draw it...
Results 1 to 25 of 498
Page 1 of 20 1 2 3 4