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.02 seconds.

  1. Replies
    1
    Views
    50

    There isn't a closed-form expression for position...

    There isn't a closed-form expression for position as a function of time. Specifically, finding the eccentric anomaly E from the mean anomaly M requires solving Kepler's equation, M=E-ε*sin(E),...
  2. Yes. The wgl* functions provide the binding...

    Yes. The wgl* functions provide the binding between Windows and OpenGL. The glX* functions do the same thing on X11.


    wglChoosePixelFormatARB() is described in the WGL_ARB_pixel_format extension...
  3. Have you tried using different alpha values? ...

    Have you tried using different alpha values?

    If the generation of coverage masks is deterministic, then overlaying multiple primitives with the same constant alpha will use the same mask for each...
  4. GLFW and GLUT are just simplified, cross-platform...

    GLFW and GLUT are just simplified, cross-platform toolkits. If you don't need cross-platform support, or you need more control than those toolkits give you, then you can just use the OS' native...
  5. Alpha values aren't ANDed; coverage masks are...

    Alpha values aren't ANDed; coverage masks are ANDed. But multiple layers with the same value may be problematic if the mask generation is deterministic. The specification suggests (but doesn't...
  6. Thread: Projection

    by GClements
    Replies
    4
    Views
    149

    If the camera in question really is a pinhole...

    If the camera in question really is a pinhole camera (without a lens), it should be straightforward to obtain a consistent result via a perspective projection.

    For a camera with a lens, you have...
  7. Alpha-to-coverage is described in 17.3.3 of the...

    Alpha-to-coverage is described in 17.3.3 of the OpenGL 4.5 specification:
  8. Replies
    2
    Views
    80

    Is the correct framebuffer bound at the point...

    Is the correct framebuffer bound at the point that you perform the query? Have you checked the value of glGetIntegerv(GL_SAMPLES)?
  9. OpenGL is a rendering API, not a modelling or...

    OpenGL is a rendering API, not a modelling or geometry library.

    That said, you can use transform-feedback mode or a compute shader as a means to accelerate computations.

    Alternatively::if you...
  10. In most cases, arrays can be indexed with any...

    In most cases, arrays can be indexed with any integer expression.

    Arrays of opaque types (e.g. samplers or images) can only be indexed with constant, uniform or dynamically-uniform expressions,...
  11. No. That's the same as if (key == 0); ...

    No.

    That's the same as


    if (key == 0);

    Also, the trailing semicolons shouldn't be there (they'll terminate the "if" statement", making the following statement a separate statement rather...
  12. Then how are you going to know when to stop...

    Then how are you going to know when to stop displaying the thruster? You need to use glutKeyboardUpFunc() to register a key-release callback.


    The above should use "=" (assignment) rather than...
  13. Create a global variable, set it to 1 in the...

    Create a global variable, set it to 1 in the key-press callback, set it to 0 in the key-release callback, have the display callback draw the thruster only if the variable is non-zero.
  14. You shouldn't be issuing drawing commands other...

    You shouldn't be issuing drawing commands other than from within the display callback. The display callback needs to call glutSwapBuffers() after everything has been drawn.

    The keyboard and mouse...
  15. Replies
    6
    Views
    255

    It depends upon the layout format (shared,...

    It depends upon the layout format (shared, packed, std140, or std430) you're using. For shared (the default) and packed, you have to query the offsets (as well as array and matrix strides) at run...
  16. I would just set it to distance, transformed to...

    I would just set it to distance, transformed to the range (-1,+1), i.e. zero maps to -1, the maximum distance to +1. The maximum distance will determine the precision of the depth buffer. W should be...
  17. Replies
    7
    Views
    287

    "World" coordinates are up to the programmer....

    "World" coordinates are up to the programmer. Legacy (fixed-function) OpenGL only has object coordinates (the values passed to glVertex/glVertexPointer and glNormal/glNormalPointer), eye coordinates...
  18. That's a warning; it's unrelated to the issue...

    That's a warning; it's unrelated to the issue with subroutine uniforms, but probably relevant to shadow mapping.

    It's related to this:


    You're setting both sampler uniforms to refer to texture...
  19. The fragment shader has two subroutine uniforms...

    The fragment shader has two subroutine uniforms (RenderType and RenderPass) but each call to glUniformSubroutinesuiv() has a count of one. That should result in the call failing with...
  20. You probably want to use separate programs for...

    You probably want to use separate programs for the two cases. You almost certainly want to use separate vertex arrays.


    It's not so expensive that you should try to shoehorn everything into a...
  21. Replies
    7
    Views
    287

    This: doesn't make sense. The overall...

    This:



    doesn't make sense.

    The overall transformation from object space to screen space is projection * view * model.

    The transformation from object space to world space is just the model...
  22. Replies
    5
    Views
    236

    Step 1.5: Divide X, Y and Z by W to convert from...

    Step 1.5: Divide X, Y and Z by W to convert from homogeneous coordinates to Euclidean coordinates. That should give you normalised device coordinates (NDC) in the range -1 to +1. Then, X and Y are...
  23. gl_InstanceID exists in GLSL 1.50 core profile. ...

    gl_InstanceID exists in GLSL 1.50 core profile.

    One obvious issue with your code is that the buffer size is wrong:


    sizeof(mapmat) will be the size of a pointer, not the size of the array it...
  24. Triple buffering can be implemented on...

    Triple buffering can be implemented on practically anything; the only exception is ancient hardware where framebuffer memory and texture memory are distinct and there simply isn't enough framebuffer...
  25. That's what the underlying function...

    That's what the underlying function (glXSwapBuffers() on X11, SwapBuffers() on Windows) does.

    However, it necessarily first issues an implicit glFlush(), and if there isn't enough space to flush...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4