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 35 minute(s) ago.

  1. Replies
    2
    Views
    88

    As Alfonse says, none of the extensions provide a...

    As Alfonse says, none of the extensions provide a 64-bit integer texture format.

    The closest thing would be to split the integer into two 32-bit halves and use GL_RG32UI. Provided that the...
  2. Replies
    5
    Views
    196

    When you say "downloading", are you talking about...

    When you say "downloading", are you talking about copying the data to a GPU buffer (e.g. PBO) or to client memory?

    If you're copying to client memory, you need to use glClientWaitSync() to block...
  3. Replies
    29
    Views
    910

    . I'm not sure why I overlooked that in my...

    .
    I'm not sure why I overlooked that in my previous post. If a structure contains vec2s, the structure itself needs to be aligned to a multiple of 8, which means that it's size will be a multiple of...
  4. Replies
    29
    Views
    910

    Unless the amount of memory involved is...

    Unless the amount of memory involved is significant, I'd suggest the opposite: add padding fields to the C++ structure so that you can just use vec3s in the GLSL structures. Or move the int/float...
  5. Replies
    29
    Views
    910

    Yes. A vec3 is aligned as if it were a vec4 for...

    Yes. A vec3 is aligned as if it were a vec4 for both std140 and std430. The only difference between the two is that std140 rounds the alignment of all arrays and structures to that of a vec4, while...
  6. Using the implicit form directly in a fragment...

    Using the implicit form directly in a fragment shader is more accurate, but it's awkward for arbitrary piecewise curves. You typically need additional data to determine which segment(s) need to be...
  7. Yes. Additive blending. Addition is...

    Yes.


    Additive blending. Addition is commutative: A+B=B+A, so the order doesn't matter.

    With linear blending, if you blend two translucent colours <c1,a1> and <c2,a2> over an opaque background...
  8. Replies
    6
    Views
    220

    Another issue which I missed last time: ...

    Another issue which I missed last time:



    The "&" shouldn't be there; you want the value of the pointer, not its address. For an array, it doesn't matter (an array used as a value "decays" to a...
  9. You need to render from back to front with that...

    You need to render from back to front with that function.

    If the images represent light sources, you might try additive blending, e.g.:


    glBlendFunc(GL_SRC_ALPHA, GL_ONE);


    or, if...
  10. Texture objects was the main one, which is likely...

    Texture objects was the main one, which is likely to be relevant to framebuffer_sRGB and texture_compression_s3tc.

    Other than that, it may be related to the fact that OpenGL 1.0 no longer exists...
  11. Replies
    6
    Views
    220

    What are colors_ and shape_?

    What are colors_ and shape_?
  12. Replies
    6
    Views
    220

    Applying the sizeof operator to a pointer returns...

    Applying the sizeof operator to a pointer returns the size of the pointer (typically 4 or 8), not the data it points to. You'll need to pass the array length as a parameter, or use a std::vector.
  13. Replies
    4
    Views
    195

    One quad per string will be quicker to draw than...

    One quad per string will be quicker to draw than one quad per character, but will typically require more texture space. Note that there's no need to have a texture containing all of the glyphs (for...
  14. There is no function named glBindBuffers in any...

    There is no function named glBindBuffers in any existing OpenGL version. From the context, I suspect that you want glBindBuffer (without the trailing "s").
  15. Replies
    3
    Views
    205

    Well, you only bind a specific level of a texture...

    Well, you only bind a specific level of a texture to a framebuffer. If the texture has more than one level, then you need to generate the other levels e.g. with glGenerateMipmap(). If you select a...
  16. The coherent flag only guarantees that the data...

    The coherent flag only guarantees that the data will be transmitted to the GPU eventually. It won't necessarily be transmitted in time for any particular command.


    The CPU's MMU tracks which...
  17. Replies
    4
    Views
    256

    Each vertex is transformed by all of the matrices...

    Each vertex is transformed by all of the matrices to obtain a position in clip space. The clip-space positions are used for rendering. In clip space, the frustum is just a cube.

    If each object has...
  18. Replies
    4
    Views
    256

    The model matrix transforms object space to world...

    The model matrix transforms object space to world space, the view matrix transforms world space to eye space, the projection matrix transforms eye space to clip space. If you want to transform the...
  19. If w and h are in pixels, your field-view angle...

    If w and h are in pixels, your field-view angle is probably much too large. if Ix, Iy and dk are (1,0,0), (0,1,0) and (0,0,1) respectively, then v(1,1)=(h/2,w/2,t_dist) and the other corners will be...
  20. The field of view angle is too large. Maybe...

    The field of view angle is too large. Maybe you're assuming degrees where radians are being used, or you're using pixels for screen coordinates rather than normalising.
  21. The time between issuing a command (calling an...

    The time between issuing a command (calling an OpenGL function) and the GPU completing execution of that command may be long. Like, several frames. Between those two points, the command is "pending"....
  22. One possibility is that the driver is blocking...

    One possibility is that the driver is blocking until any rendering commands using the previous texture contents have completed.


    glTextureSubImage2D() is synchronous. You're guaranteed to be able...
  23. Replies
    3
    Views
    211

    This isn't a "trick". This is what stencil...

    This isn't a "trick". This is what stencil testing is meant for. The reason why glStencilOp has increment/decrement/invert operations is for counting the number of times a ray intersects a surface,...
  24. Replies
    4
    Views
    217

    Does the second texture have an alpha channel? ...

    Does the second texture have an alpha channel?

    What happens if you change the blending function to glBlendFunc(GL_ONE,GL_ONE)? That should result in additive blending (i.e. both textures should...
  25. Replies
    34
    Views
    1,722

    The delay() function shouldn't be having the...

    The delay() function shouldn't be having the timer re-execute it; at least, not in its current form.

    You can either have multiple functions where each sets a specific state then triggers the next...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4