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

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    71

    EDIT: Ah, didn't read fully "the projection...

    EDIT: Ah, didn't read fully "the projection shouldn't be inverted".

    So each mesh now has it's own transform (also a mat4).

    scen.activeCam = glm::perspective(glm::radians(67.f), 640.0f / 480,...
  2. Replies
    2
    Views
    71

    Camera moves in wrong direction?

    Here's the vertex shader:

    #version 120

    uniform mat4 cammat;

    attribute vec3 a_vert;
    attribute vec2 a_tex;
    attribute vec3 a_norm;
  3. All axes are flipped, +X points left, +Y is down, +Z is from the camera..

    This is all the code that's working on the projection:

    scen.activeCam = glm::ortho(-5.f, 5.f, -5.f, 5.f, 0.001f, 100.f);
    scen.activeCam = glm::translate(scen.activeCam, glm::vec3{0, 0, -5});
    //...
  4. Oh wow, I mistook it for the size of a float,...

    Oh wow, I mistook it for the size of a float, sorry.
    Thank you so much for this!
  5. [Solved] OpenGL 2.1 VBO not rendering, blank screen.

    I'm trying to draw a simple triangle with VBOs, however I can't get it to work, it's a blank screen.
    What is the issue?


    #include<SDL2/SDL.h>
    #include<GL/glew.h>
    #include<GL/gl.h>

    const...
  6. Replies
    6
    Views
    427

    Not sure if bumping is allowed, but still, bump

    Not sure if bumping is allowed, but still, bump
  7. Replies
    6
    Views
    427

    Now my rendering code is the following: ...

    Now my rendering code is the following:

    glm::mat4& cammat4 = this->batch->GetCamMatrix4();
    cammat4 = glm::translate(cammat4, glm::vec3(-playerb->GetLinearVelocity().x,...
  8. Replies
    6
    Views
    427

    I know, my question is, which function sets the...

    I know, my question is, which function sets the translation?

    EDIT: Excuse my brainfarts.
  9. Replies
    6
    Views
    427

    May I ask which GLM function does this?...

    May I ask which GLM function does this? glm::translate adds instead of setting.
  10. Replies
    6
    Views
    427

    Camera moving "too fast"

    https://i.imgur.com/gE5qxaC.gif

    As you can see in the above screenshot, my camera is moving at speeds waaay faster than my player.
    Here is the relevant code:

    // Initializing
    cammat4 =...
  11. Replies
    1
    Views
    232

    Frame buffer support in 2.1?

    I see the framebuffer EXT however very little is written about this extension.
    Or does OpenGL 2.1 support framebuffers?
  12. A graphics engine that supports OpenGL 2.1?

    I'm putting this here as I'm not advanced at OpenGL, but I'm not strictly a beginner either.
    I've been looking at different rendering engines that use OpenGL for me to use in my game.
    However all...
Results 1 to 12 of 12