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: malexander

Page 1 of 13 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    260

    There are dvec's that can use up to 8N, and...

    There are dvec's that can use up to 8N, and perhaps they were future-proofing the feature for other types that may exceed the size of a vec4.
  2. Replies
    5
    Views
    260

    While rule 2 of the std140 spec say the base...

    While rule 2 of the std140 spec say the base alignment of a ivec2 is 2N, rule 4 specifies the stride for arrays:


    That is where the alignment of 4N is coming from.
  3. You can use the glXSwapInterval(0) function...

    You can use the glXSwapInterval(0) function defined by the GLX_SGI_swap_control extension to disable vsync for your application.
  4. You can use glScissor with an area of 1 pixel at...

    You can use glScissor with an area of 1 pixel at the specified mouse coords. That will crop the render to a single pixel. While this will save on fragment writes, you'll still pay for all vertex...
  5. I ran into an AMD driver bug where -1 for the...

    I ran into an AMD driver bug where -1 for the string length was being rejected as an invalid value, instead of indicating a NULL-terminated string. Passing strlen(msg) worked around the issue. Not...
  6. If you print the result of...

    If you print the result of glGetString(GL_RENDERER) in your app, do you get the nvidia or MESA driver?
  7. Replies
    11
    Views
    1,310

    There's no standard gl call to query memory or...

    There's no standard gl call to query memory or memory use, but you can try the AMD and Nvidia specific extensions:

    http://www.opengl.org/registry/specs/ATI/meminfo.txt...
  8. Replies
    11
    Views
    1,310

    Try reading this tutorial on drawing with VBOs: ...

    Try reading this tutorial on drawing with VBOs:

    http://www.arcsynthesis.org/gltut/Basics/Tutorial%2001.html

    It draws a single triangle, and is quite good at introducing the concept of drawing...
  9. Replies
    11
    Views
    1,310

    It looks from your code like you're rebuilding...

    It looks from your code like you're rebuilding the model every time you move it. You don't need to do this unless the model itself is deforming, and this is the source of your performance loss....
  10. Replies
    6
    Views
    884

    The only way I know of doing this in unextended...

    The only way I know of doing this in unextended GL is to use a geometry shader in conjuntion with a texture buffer object containing the UV coords. It requires that your model be all triangles, or...
  11. That's probably the bug then, in the first...

    That's probably the bug then, in the first example v3.w would be 2 and not 1, messing up any perspective divide.
  12. Replies
    16
    Views
    2,116

    This is especially true for AMD cards. While they...

    This is especially true for AMD cards. While they report a GL_MAX_VERTICES of 2^32-1, and GL_MAX_ELEMENTS_VERTICES of 2^24-1 (16M), if you use multiple vertex buffers with sizes greater than roughly...
  13. That's a good point, you do have to check the...

    That's a good point, you do have to check the GL_LINE_WIDTH_RANGE (or GL_SMOOTH_LINE_WIDTH_RANGE, if you are using smooth lines). Both AMD and Nvidia drivers on Linux and Windows support the same...
  14. Again, wide lines are deprecated but not removed...

    Again, wide lines are deprecated but not removed in the Core GL contexts. The GL ARB specifically mentions this in the GL 3.1 spec (Appendix G). Since the ARB went to the trouble of specifically...
  15. You can still use line widths > 1.0 in the core...

    You can still use line widths > 1.0 in the core profile, and render to a multisample render target. That looks pretty decent for 4x multisample and above. The old smooth lines are pretty slow for a...
  16. You can definitely use multiple TBOs in a shader...

    You can definitely use multiple TBOs in a shader stage. The setup code looks fine, though I don't have my code that does TBOs in front of me. Most of your drawing code isn't necessary, you only need...
  17. Replies
    8
    Views
    1,194

    Looking back at your OP, I see that the Intel GL...

    Looking back at your OP, I see that the Intel GL implementation only supports GLSL 1.40. So, you'll need to do:



    #version 140
    #extension GL_ARB_explicit_attrib_location : require
    ...
  18. Replies
    8
    Views
    1,194

    Try: Using version 130 will not work at...

    Try:



    Using version 130 will not work at all as layout(location) is a GLSL 330 feature. I'd expect a syntax error in that case.
  19. Ah, I was thinking you were blending a diffuse...

    Ah, I was thinking you were blending a diffuse decal.

    In that case, you might draw glBlendFuncSeparate(), where you could blend the RGB components using (Sa, 1-Sa) and A using either (0, 1) or (1,...
  20. You don't have to have diffuse.a in all 4...

    You don't have to have diffuse.a in all 4 textures' Alpha component. I have a deferred renderer where the alpha channels store other data, like your second setup. All you need to do is draw to...
  21. Replies
    7
    Views
    622

    If you're using the Compatibility profile,...

    If you're using the Compatibility profile, GL_POINT_SPRITE still exists and must be explicitly enabled. GL_POINT_SPRITE is only removed in the Core profile, and gl_PointCoord should always be...
  22. Replies
    3
    Views
    463

    Try putting more newlines at the end of each line...

    Try putting more newlines at the end of each line in the string. If that doesn't work, fetch the compile logs for each of the shaders with



    int log_len = 0;
    glGetShaderiv(vertShader,...
  23. Replies
    11
    Views
    1,454

    It's very likely the alpha test, then. It's a...

    It's very likely the alpha test, then. It's a compatiblity mode test, and likely works off the first buffer, not the union of all of them. Try:

    glDisable(GL_ALPHA_TEST);

    before you render to...
  24. In the first case, you're drawing 1 million...

    In the first case, you're drawing 1 million fragments. In the second, you're drawing 100 million fragments (and change). Since neither case is likely to be vertex processing bound, how you're drawing...
  25. Are you somehow generating negative color values...

    Are you somehow generating negative color values for light 0? Try clamping it to zero (lightval = max(vec3(0.0), lightval)). The RGBA8888 textures will implicitly clamp negative values to zero,...
Results 1 to 25 of 304
Page 1 of 13 1 2 3 4