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

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    257

    Why do you believe your float i will ever be...

    Why do you believe your float i will ever be exactly -1.8?
    Floats are not exact. They are not accurate. Never compare a float value with a constant except for perhaps 0.0 or low integers.

    Try to...
  2. I would think what you need is a...

    I would think what you need is a FrameBufferObject (FBO) which you render into (it allows you to render into a texture). You can do your effects like blur directly on the hardware by using shaders....
  3. Replies
    11
    Views
    1,065

    OpenGL doesnt know anything about text. If you...

    OpenGL doesnt know anything about text. If you want to draw text the most common way is to render a textured quad with the texture containing the text (or sometimes individual letters and you render...
  4. I dont know which programming language you use...

    I dont know which programming language you use but if you want to develop for android devices perhaps you are using Java. If that is so you might want to have a look at the LibGDX framework which...
  5. Replies
    4
    Views
    582

    Do you use your own shaders? If you do write a...

    Do you use your own shaders? If you do write a new shader for the crosshair which uses no modelview matrices and an orthogonal projection. After that it should be very easy to draw the actual...
  6. Replies
    6
    Views
    563

    I assume what the OP wants is to use code...

    I assume what the OP wants is to use code injection in GLSL shaders.

    I am personally not aware of any libraries that provide AST's for shaders or anything like that. But as far as I understood a...
  7. Replies
    5
    Views
    720

    Yes of course you are right. I dont know what I...

    Yes of course you are right. I dont know what I was thinking. Its too late at night...
  8. Replies
    5
    Views
    720

    How about: 1) Render red cube 2) Do the glow...

    How about:
    1) Render red cube
    2) Do the glow effect
    3) Render yellow cube

    This looks like the natural solution. Why is this not an option to you?
  9. Replies
    6
    Views
    619

    And what programming language are you using with...

    And what programming language are you using with GLFW?
    What kind of parameters do you want to pass?
    Can you give us a specific example of what you would like to do? Perhaps with code or pseudo code?
  10. Replies
    6
    Views
    619

    OpenGL doesnt have anything to do with keyboard,...

    OpenGL doesnt have anything to do with keyboard, mouse or other devices. OpenGL is a standard for outputting graphics only. What you are probably using is some kind of framework that handles the...
  11. Replies
    1
    Views
    361

    Push your current matrix, manipulate it with the...

    Push your current matrix, manipulate it with the translatef / rotatef calls, draw the sprite you want to have rotated and then pop the matrix again before drawing the other sprites.
  12. I dont know if this is the best solution (it...

    I dont know if this is the best solution (it possibly isnt) but you could render your entire scene into a texture, then render that texture across the entire screen with a fragment shader that...
  13. But do you have an OpenGL related question?

    But do you have an OpenGL related question?
  14. Replies
    1
    Views
    284

    Probably in your code, but we can not know until...

    Probably in your code, but we can not know until we see it.
  15. Replies
    5
    Views
    711

    I would suggest not using a texture. Instead,...

    I would suggest not using a texture. Instead, send the color for each cell in a VBO.
    I assume the positions of your cells on screen are static. In this case you can have separate buffers for the...
  16. Thread: Drawing a house

    by Cornix
    Replies
    2
    Views
    658

    I suggest you use something other than OpenGL for...

    I suggest you use something other than OpenGL for that. If you want to learn OpenGL, read a tutorial or book or watch a video series. If you want to get simple results fast use a framework build on...
  17. Replies
    11
    Views
    1,510

    With VSync enabled your render loop should block...

    With VSync enabled your render loop should block when swapping buffers. This will also block your application and thus reduce CPU load.
    If you dont have VSync enabled and you dont do any Thread...
  18. Thread: simple 2D scene

    by Cornix
    Replies
    1
    Views
    378

    I would suggest putting all static images (like...

    I would suggest putting all static images (like backgrounds, etc) in one VBO and all dynamic images (animated sprites, moving objects, etc) in a second VBO. If you have any translucency you should...
  19. Replies
    5
    Views
    1,874

    OpenGL is a standard, not a tool or a library or...

    OpenGL is a standard, not a tool or a library or anything like that. You can use it with anything as long as you have a graphics card and a driver which implements the OpenGL standard. I would...
  20. I think you would have to show us some of your...

    I think you would have to show us some of your actual code. Try to narrow your code down to the smallest program that reproduces your problem. There are plenty of possible reasons for your problem,...
  21. Replies
    15
    Views
    1,599

    It is one part of a complete shader program. A...

    It is one part of a complete shader program. A shader program is at least a vertex and a fragment shader. The vertex shader is run once per vertex and the fragment shader is run once per fragment. A...
  22. What exactly are you rendering? One big quad?...

    What exactly are you rendering? One big quad? Triangle?
    Why exactly can you not "slice" the texture by rendering more triangles? You shouldnt even need any custom glsl code for that.
  23. LWJGL is just a simple java binding for OpenGL,...

    LWJGL is just a simple java binding for OpenGL, GLFW, OpenCL, OpenAL and some other utility libraries. But python and java are easy to work together with. There are plenty of bindings for that. Of...
  24. Your requirements do not look like you actually...

    Your requirements do not look like you actually want to work with low-level openGL. I would recommend a slightly higher level API for that. I dont know what programming language you want to use but...
  25. Replies
    4
    Views
    468

    This should not have anything to do with Linux,...

    This should not have anything to do with Linux, Windows or whatever OS. The only important factors are the power of the hardware you use, the manufacturer and the drivers.

    Do I read your code...
Results 1 to 25 of 159
Page 1 of 7 1 2 3 4