Skip to content

Commit

Permalink
Use per module java language levels
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharshachilakapati committed Dec 25, 2015
1 parent ce25b2d commit 4578b75
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
package com.shc.webgl4j.examples.client;

import com.google.gwt.canvas.client.Canvas;
import com.google.gwt.event.dom.client.LoadEvent;
import com.google.gwt.event.dom.client.LoadHandler;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.RootPanel;
import org.joml.Matrix4f;
Expand Down Expand Up @@ -136,23 +134,19 @@ public void init()
glEnableVertexAttribArray(texcoordLoc);

final Image image = new Image("texture.png");
image.addLoadHandler(new LoadHandler()
image.addLoadHandler(event ->
{
@Override
public void onLoad(LoadEvent event)
{
// Make current again, this is asynchronous event
context.makeCurrent();
int texID = glCreateTexture();
glBindTexture(GL_TEXTURE_2D, texID);
// Make current again, this is asynchronous event
context.makeCurrent();
int texID = glCreateTexture();
glBindTexture(GL_TEXTURE_2D, texID);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, image);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, image);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glUniform1i(glGetUniformLocation(programID, "tex"), 0);
}
glUniform1i(glGetUniformLocation(programID, "tex"), 0);
});
image.setVisible(false);
RootPanel.get().add(image);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
package com.shc.webgl4j.examples.client;

import com.google.gwt.canvas.client.Canvas;
import com.google.gwt.event.dom.client.LoadEvent;
import com.google.gwt.event.dom.client.LoadHandler;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.RootPanel;
import org.joml.Matrix4f;
Expand Down Expand Up @@ -219,23 +217,19 @@ public void init()
glEnableVertexAttribArray(texcoordLoc);

final Image image = new Image("texture.png");
image.addLoadHandler(new LoadHandler()
image.addLoadHandler(event ->
{
@Override
public void onLoad(LoadEvent event)
{
// Make current again, this is asynchronous event
context.makeCurrent();
int texID = glCreateTexture();
glBindTexture(GL_TEXTURE_2D, texID);
// Make current again, this is asynchronous event
context.makeCurrent();
int texID = glCreateTexture();
glBindTexture(GL_TEXTURE_2D, texID);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, image);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, image);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glUniform1i(glGetUniformLocation(programID, "tex"), 0);
}
glUniform1i(glGetUniformLocation(programID, "tex"), 0);
});
image.setVisible(false);
RootPanel.get().add(image);
Expand Down
3 changes: 3 additions & 0 deletions webgl4j/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'

sourceCompatibility = 1.7
targetCompatibility = 1.7

group = "com.goharsha"
archivesBaseName = "webgl4j"
version = "0.2.7"
Expand Down

0 comments on commit 4578b75

Please sign in to comment.