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.03 seconds; generated 27 minute(s) ago.

  1. Replies
    7
    Views
    156

    The translation should be specified in "screen"...

    The translation should be specified in "screen" space (after the glm::lookAt rotation), rather than in world space. To use a world-space translation, you'd need to inverse-project one pixel...
  2. Replies
    7
    Views
    156

    You should translate in multiples of a shadow-map...

    You should translate in multiples of a shadow-map pixel to prevent the shadows from "crawling". Rather than trying to do this with glm::lookAt, I suggest either modifying the glm::ortho parameters or...
  3. Four Bézier curves connected at their endpoints...

    Four Bézier curves connected at their endpoints gives you 12 control points. A patch needs 16, so you need four more, one for each corner.

    Probably the best way to generate these is to choose the...
  4. Thread: A glitch?

    by GClements
    Replies
    3
    Views
    82

    std140 is a defined layout. The precise details...

    std140 is a defined layout. The precise details are given in section 7.6.2.2 of the OpenGL 4.5 specification. The idea is that you can deduce the layout from the definition of the block, so you can...
  5. Thread: A glitch?

    by GClements
    Replies
    3
    Views
    82

    Uniforms and attributes are entirely separate. ...

    Uniforms and attributes are entirely separate.

    Are you using the correct strides and sizes when uploading the data? Unless you use the std140 layout, array strides, sizes and alignment are...
  6. Replies
    4
    Views
    103

    Section 8.13 of the OpenGL 4.5 specification...

    Section 8.13 of the OpenGL 4.5 specification has Table 8.19:


    Major Axis Direction Target sc tc ma

    +rx TEXTURE_CUBE_MAP_POSITIVE_X ...
  7. Replies
    11
    Views
    237

    You'd have one instance containing all of the...

    You'd have one instance containing all of the vertices. The skeleton would be per-instance data.

    But the main problem with that is that you probably can't fit a non-trivial skeleton into the...
  8. Replies
    11
    Views
    237

    How? The vertex shader doesn't get to decide...

    How?

    The vertex shader doesn't get to decide what data to read from an attribute array. It gets invoked once for each vertex, with one element from each enabled attribute array stored in the...
  9. Replies
    11
    Views
    237

    How were you planning on accessing that data? ...

    How were you planning on accessing that data?

    I don't see anything in the specification that prohibits binding a single buffer to multiple targets, but it does say that the implementation may...
  10. - Rotate the vertices in the application and copy...

    - Rotate the vertices in the application and copy the modified data to the VBO
    - Add an extra vertex attribute holding the rotation for each vertex, and perform the rotation in the vertex shader
    -...
  11. Replies
    14
    Views
    451

    glDrawElementsIndirect and ...

    glDrawElementsIndirect and GL_DRAW_INDIRECT_BUFFER are in OpenGL 4.0.

    GL_ATOMIC_COUNTER_BUFFER requires OpenGL 4.2.
  12. Replies
    7
    Views
    271

    A marginal improvement is still an improvement. ...

    A marginal improvement is still an improvement.

    Different contexts have different requirements. In the case where the compression is performed "on the fly" while the end user is staring at a...
  13. Replies
    1
    Views
    74

    Because there's a geometry shader. The...

    Because there's a geometry shader.

    The geometry shader needs to have an extra input array and an extra output, and copy the value from the input to the output. E.g.


    in vec4 color[];
    out vec4...
  14. Replies
    4
    Views
    118

    #include

    #include <GL/gl.h>
  15. Changing the completely-transparent pixels from...

    Changing the completely-transparent pixels from white to match the colour of the other non-transparent pixel(s) within a 4x4 would probably improve matters.

    Using pre-multiplied alpha would...
  16. Linear filtering, tiles and arbitrary scaling...

    Linear filtering, tiles and arbitrary scaling don't play well together. Mipmaps can sometimes be an issue, but shouldn't be relevant here unless the scale factor drops below 1/32.

    Array textures...
  17. I suggest reducing your program to a single file...

    I suggest reducing your program to a single file (without any classes), and removing anything which isn't necessary to demonstrate the problem. It's unlikely that anyone is going to look at something...
  18. Replies
    1
    Views
    104

    Maybe. Is the light coming from below and left? ...

    Maybe. Is the light coming from below and left?

    You really need to see how the lighting changes as the light moves.

    Also, to tell if you're doing tangent-space mapping correctly, you need to...
  19. Other possibilities include: - Did you request...

    Other possibilities include:

    - Did you request a depth buffer by passing GLUT_DEPTH to glutInitDisplayMode?
    - If you're using shaders, are they doing anything which would affect the depth values?
  20. p2.set(0.0f,100.0f, 60.0f, 1.33f); You're...

    p2.set(0.0f,100.0f, 60.0f, 1.33f);

    You're setting the near distance to zero, which results in all of your depth values being equal. As your depth function is


    glDepthFunc(GL_LEQUAL);

    the...
  21. Replies
    3
    Views
    143

    Did you enable GL_PRIMITIVE_RESTART?

    Did you enable GL_PRIMITIVE_RESTART?
  22. Replies
    6
    Views
    183

    The following works for me: #include...

    The following works for me:


    #include <GL/gl.h>
    #include <GL/glu.h>
    #include <GL/glut.h>

    GLuint tex;
    GLUquadric* sphere;
  23. Replies
    6
    Views
    183

    Did you remember glEnable(GL_TEXTURE_2D)?

    Did you remember glEnable(GL_TEXTURE_2D)?
  24. Replies
    6
    Views
    183

    Use gluQuadricTexture() to enable or disable the...

    Use gluQuadricTexture() to enable or disable the generation of texture coordinates for a quadric.

    Everything else (enabling/disabling texturing, creating and binding textures, etc) is the same as...
  25. The fixed-function pipeline performs the...

    The fixed-function pipeline performs the calculation for each vertex. Fragment colours are obtained by interpolation.

    If you use shaders, you can perform the calculation for each fragment, which...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4