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 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Drawing multiple objects using shaders

    I have a simple animation with a box and a ball. It works fine but I would like to be sure I am drawing multiple objects the right way and not being stupid/inefficient:

    I create and bind VAOs for...
  2. Thanks, Alfonse, for a very clear answer.

    Thanks, Alfonse, for a very clear answer.
  3. Thanks again but I am curious: Why wouldn't you...

    Thanks again but I am curious:
    Why wouldn't you bother with #1? Firstly it's real easy code + why bring in a textured rectangle (which means texture sampling) when all that's asked is a one-one...
  4. Thanks, Alfonse. "glDrawPixels — write a block...

    Thanks, Alfonse.

    "glDrawPixels — write a block of pixels to the frame buffer" from OpenGL docs. I take it write = render.

    In any case, glDrawPixels(width, height, format, type, data) is really...
  5. How to copy from a PBO to the default framebuffer?

    Greetings:
    So I bind and fill a pixel buffer with:

    glGenBuffers(1, &pixelBuf);
    glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pixelBuf);
    glBufferData(GL_PIXEL_UNPACK_BUFFER, size, data,...
  6. Replies
    4
    Views
    835

    Thanks again for the help. Finally got it...

    Thanks again for the help.
    Finally got it working. Took many more hours than I thought it would:-)
  7. The vertices you have are not the 4 corners of a...

    The vertices you have are not the 4 corners of a square. They are the ends of a line segment.
    Try:

    glBegin(GL_POLYGON);
    glVertex3f(0.25f, 0.25f, 0.0f);
    glVertex3f(0.75f, 0.25f, 0.0f);
    ...
  8. Replies
    4
    Views
    835

    Thanks, bobtedbob. Still no joy but I see your...

    Thanks, bobtedbob.
    Still no joy but I see your suggestion makes sense because glTexImage2D(GL_TEXTURE_CUBE_MAP, ...) is not even legal.

    If someone has fixed-function cubemap skybox code which...
  9. Replies
    4
    Views
    835

    Skybox cubemap problem

    Greetings:
    I am trying to set up a cubemap skybox in fixed-function. Code is below. All I see are white and black rectangles - textures don't seem to draw at all. I know my getbmp function to read...
  10. Replies
    3
    Views
    2,894

    I understand that. What I am trying to do is...

    I understand that. What I am trying to do is detect the object clicked by the mouse. So, the ivec2 are click coords input from the app program. And as the frags are processed I check is...
  11. Replies
    3
    Views
    2,894

    Shared storage buffer object question

    Greeting:
    I set up a shared storage buffer object in the fragment shader (basically, followed the red book) because my program needed to exchange data with the shader.

    Here's the code in the...
  12. Replies
    2
    Views
    1,035

    gl_FragCoord question

    Greetings:
    Question: What is the range of gl_FragCoord.z (frag depth) and which end is closest/farthest from the eye?
    Thanks,
    Sam
  13. Thanks a lot for the suggestions. I indeed got...

    Thanks a lot for the suggestions.

    I indeed got line stipple working reading gl_FragCoord. x and y, and discarding according to the stipple pattern.

    This got me thinking about picking and I...
  14. Line stipples, Selection and Picking: How to do these in GL 4.3?

    Greetings:
    I am trying to rework some pre-shader programs in GL 4.3 core profile. Questions I have run into:

    1. How to draw stippled lines? As there's no glEnable(GL_LINE STIPPLE) or...
  15. Thanks. Your suggestion obviously requires the...

    Thanks. Your suggestion obviously requires the shaders to be bound to a pipeline created with glGenProgramPipelines(1, &pipeline), etc. Unfortunately, I have simply been unable to do this. The...
  16. Obviously, I am missing something here. I want...

    Obviously, I am missing something here. I want the same program to draw the curve and control points. So I have to throw the TCS and TES out in its drawing routine (after the curve is drawn). How...
  17. Okay, so how do I turn off tessellation and just...

    Okay, so how do I turn off tessellation and just let the points go through VS-FS? Precisely, I want tessellation on for the curve then turn it off for the points.
  18. How to draw a curve and points together?

    Greetings:
    I have a GL 4.3 tessellation shader program which draws a Bezier curve just fine. Now, I want to draw the control points as well. Obviously, I have to turn off the TCS and TES and switch...
  19. Separate shader objects, tessellation program problem

    Greetings:
    Here's the situation: I am using tessellation to draw a Bezier curve with 4 control points. The program runs fine as a single shader program but the problem is it won't draw anything if I...
  20. Thanks, tonyo_au. After reading your post I went...

    Thanks, tonyo_au.
    After reading your post I went in and declared actually all the built-ins for each shader stage. Still no luck.

    Now, I am beginning to wonder if it's a driver issue. Only way to...
  21. Tried 2.0, 3.0. No cigar.

    Tried 2.0, 3.0. No cigar.
  22. Separate shader pipelines program problem

    Greetings:
    I am trying to write a program to draw a Bezier curve and its 4 control points. Stand-alone separate programs to do these work fine. The point-drawing program has VS - FS shaders, the...
  23. Replies
    2
    Views
    1,056

    Thanks, tonyo_au. Separate pipelines it is then.

    Thanks, tonyo_au.
    Separate pipelines it is then.
  24. Replies
    2
    Views
    1,056

    Tessellation shader question

    Greetings:
    I have coded up a simple core 4.3 program to draw a cubic Bezier curve. The input in the app program is 4 control points, the fineness of the approximating polyline is controlled by a...
  25. GClements: Problem solved, can't thank you...

    GClements:
    Problem solved, can't thank you enough...
Results 1 to 25 of 85
Page 1 of 4 1 2 3 4