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
    246

    Well, the only thing related to opengl, is that...

    Well, the only thing related to opengl, is that you need to convert the mouse y to height-y since the origin of the screen coordinate is at the top left and the origin of opengl world coordinate is...
  2. Replies
    3
    Views
    246

    Well you need to convert the mouse screen...

    Well you need to convert the mouse screen coordinates (x and y) into your world coordinates, i.e. in terms of (clipAreaXleft,...), then compare these transformed coordinates with the area covered by...
  3. Replies
    3
    Views
    560

    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...
  4. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    658

    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 |...
  5. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    658

    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!?
  6. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    658

    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...
  7. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    658

    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...
  8. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    658

    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....
  9. Thread: Blending

    by sueyllam
    Replies
    7
    Views
    658

    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...
  10. 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....
  11. Replies
    1
    Views
    333

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

    defining a timer function can help you. See glutTimerFunc() in glut specs...
  12. 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...
  13. 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>
  14. Replies
    2
    Views
    577

    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...
  15. Replies
    3
    Views
    421

    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.
  16. Replies
    2
    Views
    316

    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
  17. Replies
    3
    Views
    359

    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,...
  18. Replies
    3
    Views
    359

    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...
  19. Replies
    3
    Views
    359

    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...
  20. 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....
  21. Replies
    3
    Views
    359

    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,...
  22. Replies
    7
    Views
    938

    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/
  23. Replies
    2
    Views
    485

    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...
  24. 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...
  25. 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...
Results 1 to 25 of 42
Page 1 of 2 1 2