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

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,217

    I got this problem solved now, so no worries lol....

    I got this problem solved now, so no worries lol.

    I needed changes to the render()-function of my RenderObject class:
    - glEnable(/Disable)VertexAttribArray()-calls were missing, which are the...
  2. Replies
    4
    Views
    1,217

    Adding back in client state toggles and...

    Adding back in client state toggles and gl*Pointer calls makes it work minus texture coordinates.


    void render() {
    if (totalTriangleCount > 0) {

    glBindBuffer(GL_ARRAY_BUFFER, vbo);
    ...
  3. Replies
    4
    Views
    1,217

    Okay so I just learned that the sampler2D uniform...

    Okay so I just learned that the sampler2D uniform needs the index of the texture unit to use, rather than the index of the texture, and glBindTexture() is still needed.


    GLuint usedTexture =...
  4. Replies
    4
    Views
    1,217

    Black screen after porting code to GL 3.3

    Hello. I am at a point where I think I am done porting my application to work with GL 3.3 and a #version 330 shader.
    However, I get a black screen (from glClear()) but don't see anything wrong. I'll...
  5. Replies
    4
    Views
    1,219

    I don't get why they pretty much force people to...

    I don't get why they pretty much force people to implement their own matrix stack now, rofl.

    Anyway, I can see truncating the translation column, but scale matrices can affect more than just the...
  6. Replies
    4
    Views
    1,219

    Obtaining normal Matrix for 1.3+ shader

    Hello.

    I am porting code to work with GLSL >=1.3 shaders.
    The gl_NormalMatrix built-in uniform, among others, is deprecated and unsupported in GLSL 1.3 and above.
    However, OGL, to my understand,...
  7. Replies
    7
    Views
    1,072

    Yeah I thought some more about this and finally...

    Yeah I thought some more about this and finally fully understood this. It has to do with light to surface is different math than surface light to eye, which is a projection through a point. If our...
  8. Replies
    7
    Views
    1,072

    I think I somewhat understand now, but somewhat...

    I think I somewhat understand now, but somewhat really. The attenuation formula is to approximate the behaviour of how light being emitted from a volume spreads out over distance. It's not the single...
  9. Replies
    7
    Views
    1,072

    I do understand that, and I do realtime rendering...

    I do understand that, and I do realtime rendering as well, but this specific step is not a lot of code. In fact, when I try to do it, it ends up looking kind of weird. It looks more like black fog...
  10. Replies
    7
    Views
    1,072

    Question on attenuation

    Hello.

    Attenuation is used to make lighting look right by giving fragments which are further away less brightness by multiplying the light color with (1 / (c + ld + qd)), where d is distance from...
  11. Replies
    1
    Views
    459

    Fixed this. Was at some point multiplying with...

    Fixed this. Was at some point multiplying with height instead of width. :whistle:
  12. Replies
    1
    Views
    459

    Texture artifacts and std::map crash

    I iterate an std::map to load textures into OGL, but it does crash after the end of an iteration and before the start of the next. It occurs after the same iteration every time for specific contents...
  13. Replies
    2
    Views
    466

    Oh they do use different palettes. Only the...

    Oh they do use different palettes. Only the mipmaps of one texture have a shared palette among them. I decided to go pure RGB after some impatience. It works but there are other issues which require...
  14. Replies
    2
    Views
    466

    Are textures with palettes worthwhile?

    Hello again.

    I now am at a point where I want to texture geometries. I have files with textures which have 4 mipmap levels each which share a 256-color palette. So there basically is one byte per...
  15. Replies
    4
    Views
    1,015

    Thank you a lot! A had a fundamental...

    Thank you a lot! A had a fundamental misunderstanding regarding the VBO. I was submitting triangle by triangle as structure of arrays with only 1 normal for the whole triangle rather than vertex by...
  16. Replies
    4
    Views
    1,015

    After more try and error I got it working. But it...

    After more try and error I got it working. But it makes no sense that it works. Why the hell does this work? rofl


    void render() {
    if (totalTriangleCount > 0) {...
  17. Replies
    4
    Views
    1,015

    Changed the render function to this: ...

    Changed the render function to this:


    void render() {
    if (totalTriangleCount > 0) {
    glBindBuffer(GL_ARRAY_BUFFER, vbo);
    ...
  18. Replies
    4
    Views
    1,015

    Crash on glDrawElements()

    Forum thought it would be nice to delete everything I typed so short story.

    Crash on line 94, but only on large scenes; black screen either way.

    Class I use to represent objects:...
  19. Replies
    1
    Views
    434

    GLEW says about nothing is supported

    Hello.

    I'm using GLEW to get extensions, but nothing is supported allegedly.

    C(++):

    void checkExtensions() {
    std::cout << "GLEW_ARB_vertex_buffer_object is " <<...
Results 1 to 19 of 19