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

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. convert index of raw image data to RGB

    I want to get RGB values from a 24 bit BGR data. This data is from a raw image without a header.
    I don't know how to convert the index of the buffer to its corresponding RGB values.
    here is what I...
  2. I wrote the following code snippet to bind a...

    I wrote the following code snippet to bind a bitmap to texture. I got an ordinary buffer filled it with some values and then assigned it as a parameter to create a 800 * 600 texture. However,...
  3. Replies
    1
    Views
    729

    render text to the screen

    what is the best way to render text to the screen? is using freeType library a suggested one?
    I am new to this, i thank if you give me detailed information of what libraries and function to use.
  4. Replies
    2
    Views
    858

    creating vertex buffer object

    Is there any way to use an array directly from CPU and not read it everytime from GPU?
    In the example below, a VBO is created and the buffer is transfered to GPU, so every time the screen gets...
  5. bind a bitmap raw data as texture to gl

    hi,
    I am receiving a bitmap of size 800 by 600 with RGB 24 bits. When I receive this bitmap from the other machine, I need to bind it to gl widget.
    what crossed my mind is to do the following,...
  6. Replies
    1
    Views
    1,179

    create texture from PNG raw pixel

    I want to create a texture when I receive a byte array. This byte array is converted first to QImage and after I bind it to the texture. When I run the program, it shows it for a second and then it...
  7. I was disconnected. That's why I sent the wrong...

    I was disconnected. That's why I sent the wrong link mistakenly. Can you please hold your horses. It happens sometimes.
  8. I do not understand how your method is...

    I do not understand how your method is implemented. However, I found this link for my problem. is this a good method?...
  9. how to write text below a point on the screen

    My screen renders some pixels. I also want to render/write the x y coordinate of every point below it. Could anyone please tell me what function I shall use to accomplish this.
  10. Replies
    1
    Views
    766

    I solved the problem. I calculated the central...

    I solved the problem. I calculated the central coordinate of the target circle and added it to the original drawing which is rendered at (0,0).
  11. Replies
    1
    Views
    766

    encircle any point on the screen

    How can I draw a circle surround any given point on the screen? Normally, OpenGL draws the circle centered at (0,0). My position indicator consists of pixels rendered as rectangles. The number of...
  12. Replies
    2
    Views
    843

    Yes, it was a link and compile problem. I did not...

    Yes, it was a link and compile problem. I did not compile & link all cpp files included in main CPP file. THanks for the hint.
  13. Replies
    2
    Views
    843

    undefined reference

    I am trying to run a program : http://ogldev.atspace.co.uk/www/tutorial16/tutorial16.html

    However, I get undefined reference to some function mentioned below, which is weird, because all those...
  14. transfering x,y coordinates from one machine to another

    down vote favorite


    I have two gl widgets inside two programs running on different machines. When user clicks a coordinate in the first machine, x and y coordinates should be sent to the other...
  15. Replies
    2
    Views
    958

    RGB 3 bytes per pixel. How come? what that makes...

    RGB 3 bytes per pixel. How come? what that makes the difference with one additional byte?
  16. Replies
    2
    Views
    958

    render image raw data to texture

    I receive raw data of an image via socket. What I want to do is to create a texture with this image raw data and render the texture in the widget. I do not know what functions to use, could anyone...
  17. Thanks for the reference. The shape I rendered...

    Thanks for the reference.
    The shape I rendered is merely what I wanted. Though, 1/4 of the circle is rendered. (I need to find where that comes from).
    Now, let's say I need to change the value of...
  18. I did not find any line in my code that binds the...

    I did not find any line in my code that binds the VBO to the shader program, is it possible that it's missing, or the code is complete and correct?
  19. Even if I enable it, it has no effect: ...

    Even if I enable it, it has no effect:


    glEnable (GL_BLEND);
    glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glDrawArrays(GL_TRIANGLES, 0, numVerts);
  20. 1063 if(!initialized) { ...

    1063

    if(!initialized)
    {
    GLuint vertexId = shaderProgram->attributeLocation("vertex");

    GLuint colorId = shaderProgram->attributeLocation("color");

    ...
  21. Thanks. I get the index of variables vertex and...

    Thanks. I get the index of variables vertex and colors using the following function:

    I think the logic of my code is correct, However what it draws is absolutely garbage.



    void...
  22. POSITION_0 & POSITION_1 are not defined. Only...

    POSITION_0 & POSITION_1 are not defined. Only GL_POSITION exists!
  23. thank you so much, I will do test it tomorrow.

    thank you so much, I will do test it tomorrow.
  24. how to bind two vertex buffers to vertex shader input, as in DirectX

    I am porting a code from DirectX/HLSL to OpenGL/GLSL. I am stuck with inputting two vertex buffers into vertex shader. My code in HLSL is as below:

    HLSL:

    float4 vs_main(float4 pos0 : POSITION0,...
  25. Thanks elFarto, I did not know Glew library...

    Thanks elFarto, I did not know Glew library contains the glMapBuffer function string.
Results 1 to 25 of 30
Page 1 of 2 1 2