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

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    537

    try a simple image of 3 spheres or even triangles...

    try a simple image of 3 spheres or even triangles one is red and one is green and one is blue and see how the colors get mapped when you save the scene... I had to use BGR instead of RGB in...
  2. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    624

    Never mind I found the problem, I should have...

    Never mind I found the problem, I should have disabled blending before drawing in black instead of after it...





    // Draws the current image.
    void draw() {
    glClear(GL_COLOR_BUFFER_BIT |...
  3. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    624

    Correction, I noticed that the second sphere does...

    Correction, I noticed that the second sphere does get drawn in areas outside the first red sphere. When I set background to black everything works fine. I am puzzled!?
  4. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    624

    Anyway I went with the second option but without...

    Anyway I went with the second option but without a stencil buffer. I drew the spheres after setting color to black, then drew again into frame buffer with blending GL_ONE GL_ONE.
    I got the first...
  5. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    624

    I do not think glColorMask () can be used easily...

    I do not think glColorMask () can be used easily as you mentioned since when rendering the second green ball I want to hold off the red component over the first red ball but want to write the red...
  6. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    624

    Thanks for the informative reply, yes indeed it...

    Thanks for the informative reply, yes indeed it works but I should add that the background color has to be black for it to work fine. A white background messes up things....
  7. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    624

    Blending

    I have the following code that displays a red and a green sphere in orthographic view with the green sphere shifted a bit in X. I used the depth function always to get an idea of the shift in case...
  8. May be because x and y of mouse map to axis x and...

    May be because x and y of mouse map to axis x and axis z vec[0] and vec[2], then you compute axis y: vec[1] = 1- (vec[0]^2+vec[2]^2)...Currently you map x and y of mouse to axis x and y instead....
  9. Replies
    1
    Views
    313

    defining a timer function can help you. See...

    defining a timer function can help you. See glutTimerFunc() in glut specs...
  10. Well I was referring to the vertex shader that I...

    Well I was referring to the vertex shader that I intended to write in opengl4. But thanks I think I will use Compatibility profile. I looked at another option which comes with glsdk in glutil but it...
  11. Displaying freeglut strokefont text in opengl4

    I have the following code:



    #include <iostream>
    #include <GL/glew.h>
    #include <GL\freeglut.h>
    //#include <glm/glm.hpp>
    //#include <glm/gtc/matrix_transform.hpp>
    #include <stddef.h>
  12. Replies
    2
    Views
    517

    First you used deprecated openGL pre programmable...

    First you used deprecated openGL pre programmable shaders. I suggest writing it using opengl3.3 or greater and use shaders. That would be challenging.
    Now why nothing gets drawn, the mouse...
  13. Replies
    3
    Views
    410

    Also you need glBegin(GL_POINTS) glEnd() to...

    Also you need glBegin(GL_POINTS) glEnd() to bracket the glVertex call to let it known that you want to render individual pixels.
  14. Replies
    2
    Views
    308

    I believe adding the following to the beginning...

    I believe adding the following to the beginning of your render_prepare function would make it work:

    glGenVertexArrays(1, &vao);
    glBindVertexArray(vao);

    where vao is GLuint
  15. Replies
    3
    Views
    348

    I finally found the bug, it was stupid, in the...

    I finally found the bug, it was stupid, in the OnInit function the following chunk of cod

    size_t colorDataOffset = sizeof(float) * 3 * numberOfVertices;
    glBindBuffer(GL_ARRAY_BUFFER,...
  16. Replies
    3
    Views
    348

    Well to make things worse, I rewrote the code...

    Well to make things worse, I rewrote the code using good old deprecated GL2 and I got the robot displayed. Everything is the same except changing drawElements to Begin End with a loop inside to...
  17. Replies
    3
    Views
    348

    Well, printing the 2 vertices (-1,-1,-1,1) and...

    Well, printing the 2 vertices (-1,-1,-1,1) and (+1,+1,+1,1) by the matrices in the code and printing out the results after dividing by W, it does not seem that clipping
    happens at all, everything is...
  18. Well I noticed that in your new vertices the...

    Well I noticed that in your new vertices the vertex -1.0, -1.0, 0.0 is missing, instead you wrote one of the vertices twice....
  19. Replies
    3
    Views
    348

    Choosing the proper field of view

    I have the following program from a tutorial on the net, and it is supposed to display a robot arm that you can control with the Keyboard.
    When it runs it displays nothing just the black background,...
  20. Replies
    7
    Views
    913

    A good place to start assuming a background in...

    A good place to start assuming a background in C++ is:
    http://www.arcsynthesis.org/gltut/
  21. Replies
    2
    Views
    469

    I believe you need to specify a version for the ...

    I believe you need to specify a version for the shaders, may be this is it...
  22. Thanks, I will give it a try. Another fix, is by...

    Thanks, I will give it a try. Another fix, is by keeping the original code and just change the profile from GLUT_CORE_PROFILE into GLUT_COMPATIBILITY_PROFILE and it works fine, without adding...
  23. And just for the curious I reverted to the...

    And just for the curious I reverted to the original code without layout in shaders and used version 330 and it did work on both ATI and GeForce. So it was a glew problem...
  24. Well after locating where the crash occurs and...

    Well after locating where the crash occurs and doing some serach on net, I found the cause is glGenVertexArrays in GL core mode sometimes cause problems with glew so just before glewInit() add the...
  25. Still does not Work. So I did trace the execution...

    Still does not Work. So I did trace the execution and found that the last message that get printed is just Before the call to glGenVertexArrays inside the init() function in test.cpp and the message...
Results 1 to 25 of 40
Page 1 of 2 1 2