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

  1. These 4 points form a diamond. You probably want...

    These 4 points form a diamond. You probably want a square. E.g.

    vec2 xy = gl_TexCoord[0] * textureSize;
    ivec2 gp1 = ivec2(floor(xy));
    ivec2 gp2 = gp1 + ivec2(1,0);
    ivec2 gp3 = gp1 + ivec2(0,1);...
  2. Replies
    6
    Views
    138

    Between these two, you're only using around 185...

    Between these two, you're only using around 185 distinct depth values with the default viewpoint. The nearest star will be 75 units from the viewpoint, which is 250 times the near distance, meaning...
  3. Replies
    6
    Views
    138

    Well, the Z coordinate appears to be quite a way...

    Well, the Z coordinate appears to be quite a way off, so I suggest checking the value of winZ. If you're reading the depth for a pixel which wasn't rendered, everything will be way off.

    Another...
  4. Replies
    16
    Views
    800

    While true, that can result in the object's...

    While true, that can result in the object's bounding box being orders of magnitude larger than is necessary (e.g. an object at the very centre of the octree would belong to the top-level node and...
  5. Replies
    2
    Views
    108

    If the buffer still bound to...

    If the buffer still bound to GL_TRANSFORM_FEEDBACK_BUFFER when you try to use it as a source texture?

    I think that this shouldn't matter provided that transform-feedback is disabled (and according...
  6. Replies
    3
    Views
    89

    You need to know the name of the display to which...

    You need to know the name of the display to which you wish to connect (it will probably be ":0", i.e. display 0 on the host running the program), the display has to exist (i.e. an X server has to be...
  7. Replies
    6
    Views
    138

    The above should probably be ...

    The above should probably be


    glReadPixels(X, viewport[4]-1-Y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, winZ );

    Except, viewport[4] is only correct if the viewport covers the entire window....
  8. Replies
    1
    Views
    138

    Delaunay triangulation and Voronoi diagrams...

    Delaunay triangulation and Voronoi diagrams aren't subdivision algorithms. They're ways of partitioning a plane based upon a set of points.

    For subdividing arbitrary geometry, the main factors...
  9. Replies
    7
    Views
    234

    The pack/unpack alignments apply to reading and...

    The pack/unpack alignments apply to reading and writing pixel rectangles. The spacing between rows has to be a multiple of the alignment.
  10. glActiveTexture() and glBindTexture(). If you're...

    glActiveTexture() and glBindTexture(). If you're using shaders, use glUniform1i() to associate texture units with sampler uniforms.
  11. Hard to say with so little information. Have...

    Hard to say with so little information.

    Have you tried disabling the GL_RASTERIZER_DISCARD to see what it's actually drawing? Bear in mind that errors can occur because of issues with...
  12. In which case, they're equal, i.e. both...

    In which case, they're equal, i.e. both correspond to exactly the same rotation (in the same way that e.g. glRotate(angle,x,y,z) and glRotate(-angle,-x,-y,-z) do). They will both generate the same...
  13. Are you actually calling...

    Are you actually calling glBeginTransformFeedback()?
  14. Replies
    7
    Views
    234

    Size and alignment are different things. ...

    Size and alignment are different things.

    Suppose that you have texture data with GL_RGB format (3 bytes per component) and a width of 123, with no padding between rows (i.e. the first byte of the...
  15. Replies
    7
    Views
    234

    Memory addresses are just numbers. An even...

    Memory addresses are just numbers. An even address means that the address is a multiple of two.

    Arrays declared as variables or allocated with e.g. malloc() or "new" can safely be assumed to be...
  16. Replies
    16
    Views
    800

    If you're using OpenGL 3.2 or later, you can draw...

    If you're using OpenGL 3.2 or later, you can draw as many sub-ranges of a VBO as you wish with a single glMultiDrawArrays() call.

    With earlier versions, you can generate an index array dynamically...
  17. Replies
    2
    Views
    135

    Also, consider that most materials are colourless...

    Also, consider that most materials are colourless (white) when it comes to specular reflection. Coloured materials typically consist of diffuse-reflecting coloured particles suspended within a...
  18. Replies
    5
    Views
    171

    There's actually three types: -...

    There's actually three types:

    - glVertexAttribPointer() is for attributes which are accessed via a single-precision floating-point variable (scalar, vector or matrix) in the shader. The source...
  19. Replies
    4
    Views
    178

    The coordinates passed to glRasterPos() are...

    The coordinates passed to glRasterPos() are transformed by the current model-view and projection matrices to obtain window coordinates. These are floating-point values which are rounded down to an...
  20. Replies
    4
    Views
    178

    Bitmaps are rendered using the current raster...

    Bitmaps are rendered using the current raster colour. The current raster colour is set by glRasterPos() from either the current colour or (if lighting is enabled) the colour produced by the lighting...
  21. Replies
    7
    Views
    195

    Chapter 3 of the red book covers transformations....

    Chapter 3 of the red book covers transformations. Examples 3-6 and 3-7 cover composing transformations.
  22. Replies
    3
    Views
    149

    If the slices are between sample points (by...

    If the slices are between sample points (by "aligned to the grid", I mean that slices actually pass through all the points in a "plane"), then you need trilinear filtering.


    Texture lookups use...
  23. Replies
    7
    Views
    195

    Yes. However, the cylinder is still rotating...

    Yes.

    However, the cylinder is still rotating about a different axis to the cube; it's at the correct angle, but the offset is different:



    Again, the key point is that the transformations...
  24. Replies
    5
    Views
    460

    Another possible approach is: [ x ] [ xa...

    Another possible approach is:


    [ x ] [ xa xb xc ] [ a ]
    [ y ] = [ ya yb yc ] * [ b ]
    [ z ] [ za zb zc ] [ c ]

    [ x ] [ xs xt ] [ s ]
    [ y ] = [ ys yt ] * [ t ]
    [ z ] [ zs zt ]
  25. Replies
    7
    Views
    195

    The floor is rotating about an axis which is 10...

    The floor is rotating about an axis which is 10 degrees from vertical, while the cylinder is rotating about an axis which is 100 degrees from vertical.

    If you wanted the cylinder to be oriented so...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4