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. Using even a single UBO means you have to call...

    Using even a single UBO means you have to call glBindBufferBase (or glBindBufferRange); that's how you bind UBOs to named uniform blocks.

    glBindBuffer(GL_UNIFORM_BUFFER) doesn't do anything except...
  2. Replies
    2
    Views
    170

    What is "this"? &entityInfoBuffer.front() will...

    What is "this"? &entityInfoBuffer.front() will point to an array of glm::mat4's, each of which is 16 floats. There will be no other data or padding either within the matrices or between them.
  3. texture2D(), texture() etc take normalised...

    texture2D(), texture() etc take normalised texture coordinates (unless you're using a sampler2DRect). texelFetch() (and variants) take non-normalised coordinates (i.e. a value of 1 corresponds to one...
  4. There's no reason to render 576 lines then...

    There's no reason to render 576 lines then discard half of them; you can just render 288 lines for each field.

    One slightly tricky point is to get the projection matrix correct. The pixel centres...
  5. VAOs can't be shared between contexts (nor can...

    VAOs can't be shared between contexts (nor can FBOs, program pipeline objects or transform feedback objects).

    You can use a single context on multiple windows, provided that all windows are...
  6. This just calls the superclass' makeCurrent()...

    This just calls the superclass' makeCurrent() method. you'd need to use something like


    mainwindow->context()->makeCurrent(this);.



    You should be able to use the context created for the...
  7. First, binding the VBO serves no purpose here,...

    First, binding the VBO serves no purpose here, because attribute array bindings are stored in the current VAO.

    Second, you shouldn't be creating a new VAO for each call to the Draw method; you...
  8. Replies
    5
    Views
    174

    The OpenGL library needs to have a specific name...

    The OpenGL library needs to have a specific name (and more) so that you don't need a different executable for each vendor. But the OpenGL library is typically part of the OS, and simply calls out to...
  9. VAOs aren't shared between contexts. More...

    VAOs aren't shared between contexts. More generally, objects which contain references to other objects aren't shared (more details here).


    The simplest way is not to use a different context for...
  10. Replies
    5
    Views
    174

    On Windows, the OpenGL library (opengl32.dll)...

    On Windows, the OpenGL library (opengl32.dll) only exports the functions which are part of OpenGL 1.1. The only way to use functions added in later versions or in extensions is to first use...
  11. Replies
    1
    Views
    111

    The LoD will be log2(20)~=4.32. The...

    The LoD will be log2(20)~=4.32.

    The calculation is given in 8.14.1 of the OpenGL 4.5 specification.
  12. There is no "OpenGL project". Khronos (formerly...

    There is no "OpenGL project". Khronos (formerly the ARB) publishes a standard, not software. It's up to vendors (or open-source projects) to supply drivers for hardware.


    Wrong, for the most...
  13. You need to use an offset of one texel. If you're...

    You need to use an offset of one texel. If you're modifying normalised texture coordinates, you need to divide the offset by the size of the texture.




    This should be


    gl_FragColor =...
  14. Replies
    6
    Views
    409

    Probably. But it ought to be possible to get this...

    Probably. But it ought to be possible to get this working using the package manager, and that should be preferred. So you should first try uninstalling all related packages then reinstalling only the...
  15. Replies
    6
    Views
    409

    Yes. libGL.so is a dangling symlink (i.e. it...

    Yes. libGL.so is a dangling symlink (i.e. it references a file which doesn't exist).


    The linker uses the libGL.so symlink to open the library. This doesn't exist, which is the root of your...
  16. Replies
    9
    Views
    276

    Well, if you use OpenGL 1.1, you'd be hard...

    Well, if you use OpenGL 1.1, you'd be hard pressed to find any device supporting any OpenGL version where it doesn't work. More generally, the older the OpenGL version, the more devices will support...
  17. Yes. But then the inputs (x00 etc) would also be...

    Yes. But then the inputs (x00 etc) would also be vec3 rather than float.

    If you wanted to accurately simulate the flow of ink, you might even use more than 4 components, i.e. multiple input...
  18. Replies
    9
    Views
    276

    The main thing is to learn at least OpenGL 2.0...

    The main thing is to learn at least OpenGL 2.0 and to avoid using legacy features (those which aren't available in 3.2+ core profile). If you don't see a function listed in the OpenGL 4 reference...
  19. No, it's the actual value written to the...

    No, it's the actual value written to the framebuffer.
  20. Replies
    6
    Views
    409

    I'm fairly sure that libGL.so.355.11 is the...

    I'm fairly sure that libGL.so.355.11 is the nVidia version, not the Mesa version.

    What does


    ls -l /usr/lib64/libGL.so
    ldd /usr/lib64/libGL.so

    show?
  21. Replies
    1
    Views
    137

    You can't map a texture's pixels directly. The...

    You can't map a texture's pixels directly.

    The closest you can get is to create a buffer, map it, decompress to the mapped region, then bind the buffer to GL_PIXEL_UNPACK_BUFFER before calling...
  22. Replies
    4
    Views
    199

    That creates a normalised texture (with an...

    That creates a normalised texture (with an unspecified number of bits). For an integer texture, you need e.g.


    glTexImage2D(GL_TEXTURE_2D, 0, GL_R8I, width, height, 0, GL_RED_INTEGER, GL_INT, 0);...
  23. Replies
    5
    Views
    302

    If you're using shaders, you shouldn't really be...

    If you're using shaders, you shouldn't really be using glTranslatef() etc. You should construct the matrices in the application and pass them to OpenGL via glUniformMatrix4fv() etc.
  24. The GLSL version and profile can be specified...

    The GLSL version and profile can be specified with a #version directive in the shader, e.g.


    #version 150 compatibility

    states that the shader uses GLSL 1.50, compatibility profile.

    The...
  25. Yes. But for a shadow map, there's no need to...

    Yes. But for a shadow map, there's no need to split the transformation into separate model-view and projection matrices then combine them. You can just apply all of the operations to a single matrix...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4