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

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    160

    There is a lot of caching going on with OpenGL...

    There is a lot of caching going on with OpenGL calls. Use glFlush after you submitted all OpenGL calls and before you want to do the CPU stuff. Otherwise the swapbuffers command will cause a glFlush...
  2. Replies
    7
    Views
    593

    Valid point. I tested some more and to me it...

    Valid point.

    I tested some more and to me it looks like dxt3/5 + 7z(default compression settings) has a slightly better image quality then a jpg at the same file size. (Using gimp + dds plugin)...
  3. Replies
    7
    Views
    593

    Never really used compressed textures because so...

    Never really used compressed textures because so far I hat no need for them in my projects.

    I could imagine that you still can compress raw DXT very well with some default compression algorithms....
  4. Just a guess from how compressed textures work...

    Just a guess from how compressed textures work with there block size:



    static inline int align(int value, int alignment)
    {
    return value + ((value % alignment) ? (alignment - (value %...
  5. Well, drivers cache a lot of the commands before...

    Well, drivers cache a lot of the commands before they actually do anything.
    Changing the FBO normally is the most expensive action. And then you often switch between many shaders during rendering to...
  6. Well there is GL_ARB_depth_clamp (Core since...

    Well there is GL_ARB_depth_clamp (Core since 3.2). So maybe a simple glDisable(GL_DEPTH_CLAMP) could do the trick? Never used that one and have no idea how it interacts with clip_control.
    But maybe...
  7. To make this more useful for future google...

    To make this more useful for future google archeologists here is my solution.

    The projection matrix is the same for both variants:

    With GL_ARB_clip_control:


    glDepthFunc(GL_GREATER);...
  8. Replies
    15
    Views
    1,360

    Isn't repeatedly mapping/unmapping one of the...

    Isn't repeatedly mapping/unmapping one of the extreme performance killers that you should not use it in any case?
  9. Replies
    15
    Views
    1,360

    SDL2 for example comes directly with shared GL...

    SDL2 for example comes directly with shared GL contexts. If you don't use SDL2 you can take a look at there code.

    The things you would update/create in a separate threads would be buffers and...
  10. Well depending on how glDepthRange(-1.0, 1.0)...

    Well depending on how glDepthRange(-1.0, 1.0) actually acts in GL Core >= 4.3, you also could use that. Sure that also is not supported by MacOS right now, but that is not my target at the moment....
  11. Yes glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE)...

    Yes glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE) combined with glDepthRange(1.0,0.0) is marginally better but not what I was locking for.

    I got a working projection matrix for...
  12. Replies
    4
    Views
    739

    When your vertex calculation are expensive you...

    When your vertex calculation are expensive you should use https://www.opengl.org/wiki/Transform_Feedback

    You basically calculate all the vertex data once and write them into a buffer, and then use...
  13. Well, the whole point about reversed float depth...

    Well, the whole point about reversed float depth buffer is to use of the precision around 0 of floating point numbers.
    ...
  14. How to setup projectionMatrix/worldMatrix for use with inverted float depth buffer?

    So I try to get the luxury of a decent depth buffer resolution but so far only see the horrors of z fighting.

    Here is what I "understand":

    First I need GL_NV_depth_buffer_float with...
  15. Replies
    4
    Views
    558

    @lambage: What you posted is ok, the problem...

    @lambage:
    What you posted is ok, the problem must be somewhere else. Is the shader active (glUseProgram(program)) when you call glUniform1iv?
  16. Just one more difference: glTexImage takes...

    Just one more difference: glTexImage takes unsized internalformate types. glTexStorage does not.

    In Theory texture storage should be faster at bind because there is less validation going on. I...
  17. Replies
    4
    Views
    660

    In C/C++ you can simply change the packing...

    In C/C++ you can simply change the packing alignment to 1 byte.


    #pragma pack(push) //save default alignment
    #pragma pack(1)
    class myClass
    {
    GLuint x;
    GLushort y;
    };
  18. Thread: Destroy Mipmaps

    by Osbios
    Replies
    12
    Views
    1,234

    Completely agree with mhagain here. As long as...

    Completely agree with mhagain here.
    As long as you are not using resident memory (for bindless textures) the driver will take care of stuff that is not used in case of memory constrains.

    You also...
  19. Well I don't see what your event system is or...

    Well I don't see what your event system is or what your event handler does, so I have to guess what can help.

    Normally you get events for every window resize.
    The event will carry the values of...
  20. What you are looking for is glViewport...

    What you are looking for is glViewport.
  21. Solved: ...

    Solved:

    SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
  22. GL_KHR_debug callback in linux mesa but not with windows blob driver (AMD 7870)

    I use GL_KHR_debug to get callbacks for gl errors. It works fine in linux with the radeon/mesa drivers.
    But in windows with the blob driver I don't get any callbacks at all.

    I checked and I get a...
  23. Oh well, that is what I get for only using OpenGL...

    Oh well, that is what I get for only using OpenGL through my own c++ abstraction this days.
    I basically was just explaining how to add a offset to the index value.
  24. glDrawRangeElements is just glDrawElements with a...

    glDrawRangeElements is just glDrawElements with a hind about the minimum and maximum used index VALUE.

    What you are looking for is glDrawElementsBaseVertex. It comes with GL3.2 or higher....
  25. Well the problem with this is that it only tests...

    Well the problem with this is that it only tests with one set of input data (e.g. uniforms). But the input normally would change dynamically over the runtime of the application. Most likely you use a...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4