Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor tweaks to make everything exactly like c-version of book

  • Loading branch information...
commit 030ab75d4eac3d086abd2184b0323228c1a40822 1 parent b302e4d
@alihelmy authored
View
2  LessonOne/com/onehandstand/lwjgltutorial/lessonone/LessonOne.java
@@ -78,7 +78,7 @@ private void initOpenGL() {
// setup the camera params
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- GLU.gluPerspective(45.0f, (float)width / (float)height, 0.1f, 100f);
+ GLU.gluPerspective(45.0f, (float)width / (float)height, 0.0f, 100f);
// setup the model (drawing) params
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
View
7 LessonOne/com/onehandstand/lwjgltutorial/lessonone/ShaderTriangle.java
@@ -39,13 +39,10 @@ private void initShaders() {
if(this.vertexShader!=0 && this.fragmentShader!=0) {
//add in shaders to main program
glAttachObjectARB(this.shader, this.vertexShader);
- glAttachObjectARB(this.shader, this.vertexShader);
+ glAttachObjectARB(this.shader, this.fragmentShader);
glLinkProgramARB(this.shader);
glValidateProgramARB(this.shader);
- //check if shader is valid
- if(this.isShaderValid(this.shader)) {
- this.useShaders=true;
- }
+ this.useShaders=true;
}
}
}
View
2  LessonOne/shaders/screen.vert
@@ -1,5 +1,5 @@
#version 120
attribute vec2 coord2d;
void main(void) {
- gl_Position = vec4(coord2d, 1.0, 1.0);
+ gl_Position = vec4(coord2d, 0.0, 1.0);
}
Please sign in to comment.
Something went wrong with that request. Please try again.