Skip to content

Commit

Permalink
Reduced openGL requirement level from 3.0 to 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvbl committed May 21, 2014
1 parent 6fc80ac commit 2d7d9f3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 122 deletions.
21 changes: 0 additions & 21 deletions Python-Powered-Pixels/src/core/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import static org.lwjgl.util.glu.GLU.gluOrtho2D;

import java.io.File;
import java.io.FileInputStream;

import graphics.TextureRenderer;

import javax.swing.JOptionPane;

Expand All @@ -31,9 +28,7 @@ public static void main(String[] args) {
interpreter.execfile(Main.class.getClassLoader().getResourceAsStream("init.py"));
PySystemState sys = Py.getSystemState();
sys.path.append(new PyString(getJARPath()));
TextureRenderer.init();
interpreter.execfile("script.py");
idle();
} catch(Exception e) {
JOptionPane.showMessageDialog(null, e.toString(), "Python error", JOptionPane.ERROR_MESSAGE);
}
Expand Down Expand Up @@ -70,14 +65,9 @@ private static void initOpenGL() {
}

private static void newFrame() {
TextureRenderer.drawScreenFrame();

Display.update();
Display.sync(60);

TextureRenderer.setupNextFrame();
TextureRenderer.updateTexture();

if(Display.isCloseRequested()) {
Display.destroy();
System.exit(0);
Expand All @@ -98,17 +88,6 @@ public static void newBlankFrame() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}

private static void idle() {
System.out.println("Idling..");
while(!Display.isCloseRequested()) {
TextureRenderer.drawScreenFrame();
TextureRenderer.setupNextFrame();

Display.update();
Display.sync(60);
}
}

private static String getJARPath() {
String path = Main.class.getProtectionDomain().getCodeSource().getLocation().getPath();
File jarFile = new File(path).getParentFile();
Expand Down
100 changes: 0 additions & 100 deletions Python-Powered-Pixels/src/graphics/TextureRenderer.java

This file was deleted.

1 change: 0 additions & 1 deletion Python-Powered-Pixels/src/texture/Texture.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.lwjgl.opengl.GL11.*;
import graphics.Colour;
import graphics.GraphicsController;

public class Texture {
private final int id;
Expand Down

0 comments on commit 2d7d9f3

Please sign in to comment.