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

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Thanks, Thokra. From the point of view of...

    Thanks, Thokra.
    From the point of view of easy-to-understand code, my main concern now, I guess separate buffers/uniforms for separate objects is the best. I can see why though if you're after...
  2. I am just learning to code shaders so performance...

    I am just learning to code shaders so performance is not an issue for me at this time. So, it's simply a coding question: if uniforms are different for a bunch of objects can they be packed into a...
  3. Thanks again, Alfonse. I was actually confused...

    Thanks again, Alfonse.
    I was actually confused by your initial response but that was because I was missing the point that glUniformSubroutine() takes as parameter an array indexed by subroutine...
  4. Thanks for the response, Alfonse. I see your...

    Thanks for the response, Alfonse.
    I see your point but how about if obj1 and obj2 are, additionally, transformed differently, i.e., the modelview matrix is MV1 for obj1 and MV2 for obj2? In this...
  5. Thokra, I have a question for you. You say "For...

    Thokra,
    I have a question for you. You say
    "For the first case, where the logic is identical, you don't need branching in any way in the shader code because, well, the logic is identical. Just...
  6. Thank you, Alfonse. However, I can't find the...

    Thank you, Alfonse.
    However, I can't find the command glSubroutineUniforms() in the 4.x docs. Can you say again how to set a uniform?
  7. Thanks, tonyo_au. I think I see what you mean...

    Thanks, tonyo_au.
    I think I see what you mean and there's a bit in the RB which seems to indicate something similar. But I have a follow-up question in that case.

    So, a subroutine can be of...
  8. Shader subroutines: when to call glGetSubroutineUniformLocation()?

    Greetings:
    I am learning shader subroutines and wrote a toy program along the lines of one in the shading language cookbook (I also referred to the recent red book edn.). The program seems to run...
  9. As always, thokra, thank you for a clear and...

    As always, thokra, thank you for a clear and comprehensive reply. Shader subroutines are clearly what was missing from my list.
  10. Multiple objects: single or multiple shaders?

    This topic is actually a follow-on of an earlier posting of mine "Generating pipelines..." where I learned from thokra's responses how to generate pipelines in 4.3. The reason to post a new thread is...
  11. Thokra, thank you again.

    Thokra, thank you again.
  12. It works! Thanks a million. Can I ask though why...

    It works! Thanks a million.
    Can I ask though why this redeclaration is needed: after all gl_PerVertex is a built-in so why does a shader need to be "told" about it again? And one more: if it's out...
  13. Hi Thokra: The fragment shader and pipeline...

    Hi Thokra:
    The fragment shader and pipeline don't generate errors. The only one is from the vertex shader as below:

    Vertex info
    -----------
    0(12) : error C7592: ARB_separate_shader_objects...
  14. Hi Thokra: Really appreciate if you took a look....

    Hi Thokra:
    Really appreciate if you took a look. I am working in Win7/Visual C++ 2010. The code compiles ok but I just get a blank screen. The triangle is not drawn.
    Thanks,
    Sam

    Main program
    ...
  15. Thanks a million, Thokra. I am going to try then...

    Thanks a million, Thokra.
    I am going to try then to write a minimal program setting up a pipeline to draw a triangle. If it doesn't work I hope you won't mind taking a look.
  16. Generating pipelines, attaching shaders: working code anyone?

    Greetings:
    I am using core 4.3. Masochistic maybe but your help would be appreciated with the following:-)

    I have two different geometric objects that need to be transformed differently. I know I...
  17. Replies
    4
    Views
    335

    Thanks, nightmareci.

    Thanks, nightmareci.
  18. Replies
    4
    Views
    335

    Thanks, Dark Photon. But I am curious about 4.3...

    Thanks, Dark Photon.
    But I am curious about 4.3 core. Does one have to code up spheres, toruses, etc. by hand? Or is there some other library which might help (e.g., glm for math)?
  19. Replies
    4
    Views
    335

    GlUT objects in OpenGL 4.3

    Greetings:
    What I see with 4.3 is that objects should be encapsulated in VAOs with the vertex position/color etc. data buffered. So how does something like glutWireTorus() (where we don't "see" the...
  20. Replies
    2
    Views
    312

    Thanks, Alfonse, that clears it up. I really...

    Thanks, Alfonse, that clears it up. I really appreciate the quick response.
  21. Replies
    2
    Views
    312

    Question re gl_FragColor

    Greetings:
    I had an understanding that a vertex shader must write gl_Position and a fragment shader must write gl_FragColor. But looking at some recent books (OpenGL 4+) it seems that only the first...
  22. Replies
    2
    Views
    463

    Thanks, Nowhere-01. Actually I was being dumb. I...

    Thanks, Nowhere-01.
    Actually I was being dumb. I had omitted
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image[0]->sizeX, image[0]->sizeY, 0,
    GL_RGB, GL_UNSIGNED_BYTE, image[0]->data);...
  23. Replies
    2
    Views
    463

    glGenerateMipmap() question

    Greetings:
    The code below works fine if I uncomment gluBuild2DMipmaps() and comment out glGenerateMipmap(). But the way it is, trying to use glGenerateMipmap() to generate mipmaps, doesn't work. It...
  24. Replies
    4
    Views
    589

    Thanks, Nowhere-01!

    Thanks, Nowhere-01!
  25. Replies
    4
    Views
    589

    Hi Nowhere, Thanks for the response. Attached...

    Hi Nowhere,
    Thanks for the response. Attached are grabs of what's drawn for a texture size 512x512 and then scaled to 480x480. Below is the part of the code that loads the image:
    Sam

    struct...
Results 1 to 25 of 46
Page 1 of 2 1 2