// Path: src/main/java/yk/senjin/DDDUtils.java
// public static void glLoadMatrix(Matrix4 m) {
//     m.store(multMatrixTemp);
//     multMatrixTemp.rewind();
//     GL11.glLoadMatrix(multMatrixTemp);
// }


import yk.jcommon.utils.MyMath;
import static org.lwjgl.opengl.GL11.*;
import static yk.jcommon.fastgeom.Matrix4.ortho;
import static yk.senjin.DDDUtils.glLoadMatrix;
package yk.senjin.examples.simple;



/**
 * Created by Yuri Kravchik on 17.11.17.
 */
public class IKnowOpenGL_5_PixelPerfect extends SimpleLwjglRoutine {
    public static void main(String[] args) {
        new IKnowOpenGL_5_PixelPerfect().main();
    }

    @Override public void onTick(float dt) {
        glMatrixMode(GL_PROJECTION);
        drawPixelScheme(this.w, this.h);
        super.onTick(dt);
    }

    public static void drawPixelScheme(int w, int h) {
        //glLoadMatrix(ortho(0, w, h, 0, 0, 10));//0,0 is LEFT TOP
// Path: src/main/java/yk/senjin/DDDUtils.java
// public static void glLoadMatrix(Matrix4 m) {
//     m.store(multMatrixTemp);
//     multMatrixTemp.rewind();
//     GL11.glLoadMatrix(multMatrixTemp);
// }


// Path: src/main/java/yk/senjin/examples/simple/IKnowOpenGL_5_PixelPerfect.java
import yk.jcommon.utils.MyMath;
import static org.lwjgl.opengl.GL11.*;
import static yk.jcommon.fastgeom.Matrix4.ortho;
import static yk.senjin.DDDUtils.glLoadMatrix;

package yk.senjin.examples.simple;



/**
 * Created by Yuri Kravchik on 17.11.17.
 */
public class IKnowOpenGL_5_PixelPerfect extends SimpleLwjglRoutine {
    public static void main(String[] args) {
        new IKnowOpenGL_5_PixelPerfect().main();
    }

    @Override public void onTick(float dt) {
        glMatrixMode(GL_PROJECTION);
        drawPixelScheme(this.w, this.h);
        super.onTick(dt);
    }

    public static void drawPixelScheme(int w, int h) {
        //glLoadMatrix(ortho(0, w, h, 0, 0, 10));//0,0 is LEFT TOP
        glLoadMatrix(ortho(0, w, 0, h, 0, 10));//0,0 is LEFT BOTTOM