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
    2
    Views
    20

    #include

    #include <GL/gl.h>
  2. 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...
  3. 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...
  4. 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...
  5. Replies
    1
    Views
    66

    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...
  6. 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?
  7. 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...
  8. Replies
    3
    Views
    113

    Did you enable GL_PRIMITIVE_RESTART?

    Did you enable GL_PRIMITIVE_RESTART?
  9. Replies
    6
    Views
    149

    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;
  10. Replies
    6
    Views
    149

    Did you remember glEnable(GL_TEXTURE_2D)?

    Did you remember glEnable(GL_TEXTURE_2D)?
  11. Replies
    6
    Views
    149

    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...
  12. 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...
  13. glLight() and glMaterial() set the constant...

    glLight() and glMaterial() set the constant parameters used in the Blinn-Phong shading model. The other parameters are the position and the normal, which are specified separately for each vertex...
  14. The "fixed function pipeline" refers to the...

    The "fixed function pipeline" refers to the behaviour of OpenGL without shaders, which includes the behaviour of older versions which didn't support shaders.

    It's "fixed" in the sense that it's...
  15. If you use glShadeModel(GL_FLAT) or a...

    If you use glShadeModel(GL_FLAT) or a "flat"-qualified shader variable, the value for all fragments is taken from one of the vertices (by default, the last one, although this can be changed with...
  16. Replies
    2
    Views
    84

    There isn't a function by that name. Instead,...

    There isn't a function by that name. Instead, there are three similar functions from 3 different extensions:

    glXSwapIntervalEXT() from EXT_swap_control
    glXSwapIntervalMESA() from...
  17. Replies
    25
    Views
    640

    I cannot get the "warping" to occur. Changed the...

    I cannot get the "warping" to occur. Changed the texture to a chequerboard pattern to make it more clear. Also tested on Windows.

    So it's starting to look like it might be a driver issue.
  18. Replies
    25
    Views
    640

    That works fine for me (Linux/x86-64, Mesa...

    That works fine for me (Linux/x86-64, Mesa 10.3.7). You're getting texture warping?
  19. Replies
    5
    Views
    144

    layout(triangles) in; layout(triangle_strip,...

    layout(triangles) in;
    layout(triangle_strip, max_vertices=3) out;

    out vec3 normal;

    void main()
    {
    vec3 v1 = gl_in[1].gl_Position - gl_in[0].gl_Position;
    vec3 v2 =...
  20. The fixed function lighting calculates a colour...

    The fixed function lighting calculates a colour for each vertex, which is then interpolated over the surface of the primitive to obtain the colour for each fragment.

    Any result which can be...
  21. Replies
    6
    Views
    121

    A stencil test has the advantage of not needing...

    A stencil test has the advantage of not needing to compute clip planes. Also, it isn't limited to a convex polygon.

    However, clip planes can discard entire primitives prior to rasterisation,...
  22. Replies
    25
    Views
    640

    You could try disabling filtering (i.e. setting...

    You could try disabling filtering (i.e. setting both the min/mag filters to GL_NEAREST), just to check.


    I would assume that it's an issue in your code. You don't appear to be doing anything...
  23. Replies
    6
    Views
    121

    glClipPlane() and glEnable(GL_CLIP_PLANEi) are...

    glClipPlane() and glEnable(GL_CLIP_PLANEi) are deprecated in OpenGL 3+, so they aren't available in a core profile context.

    The new approach is to use glEnable(GL_CLIP_DISTANCEi) and have the...
  24. Replies
    25
    Views
    640

    It shouldn't matter if they were. So long as the...

    It shouldn't matter if they were. So long as the data is constant, and the geometry consists of triangles, there really isn't anything which should cause the texture to warp like that.

    .
    In...
  25. Replies
    2
    Views
    73

    For a flat-shaded cube, you need 24 distinct...

    For a flat-shaded cube, you need 24 distinct vertices (4 per face), each of which needs a position, a normal, and texture coordinates, i.e. each attribute array needs to contain 24 vectors (3-element...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4