Commits

John Marsden committed 86a0de1

Standards for Shader load methods (i still mess them up)

  • Participants
  • Parent commits ea919fe
  • Branches develop

Comments (0)

Files changed (3)

src/main/java/cc/plural/ecs/provider/LWJGLRendererGL2.java

             {
                 shader.enable();
                 {
-                    shader.storeUniform(shader.getUniformLocation("projectionMatrix"), projectionMatrix);
-                    shader.storeUniform(shader.getUniformLocation("viewMatrix"), viewMatrix);
-                    shader.storeUniform(shader.getUniformLocation("modelMatrix"), modelMatrix);
+                    shader.loadUniform(shader.getUniformLocation("projectionMatrix"), projectionMatrix);
+                    shader.loadUniform(shader.getUniformLocation("viewMatrix"), viewMatrix);
+                    shader.loadUniform(shader.getUniformLocation("modelMatrix"), modelMatrix);
 
                     mesh.enable(shader);
                     GL11.glDrawElements(GL11.GL_TRIANGLES, mesh.getIndicesCount(), GL11.GL_UNSIGNED_SHORT, 0);

src/main/java/cc/plural/ecs/provider/StringLWJGLShader.java

      * @param matrix the matrix that will be set.
      */
     @Override
-    public void storeUniform(String name, Matrix4f matrix) {
+    public void loadUniform(String name, Matrix4f matrix) {
         if (!hasUniform(name)) {
             return;
         }
         int location = getUniformLocation(name);
-        storeUniform(location, matrix);
+        loadUniform(location, matrix);
     }
 
     /**
      * @param matrix the matrix that will be set.
      */
     @Override
-    public void storeUniform(int location, Matrix4f matrix) {
+    public void loadUniform(int location, Matrix4f matrix) {
         if (!hasUniform(location)) {
             return;
         }

src/main/java/cc/plural/ecs/renderer/Shader.java

         return builder.toString();
     }
 
-    public abstract void storeUniform(String name, Matrix4f matrix);
+    public abstract void loadUniform(String name, Matrix4f matrix);
     
-    public abstract void storeUniform(int location, Matrix4f matrix);
+    public abstract void loadUniform(int location, Matrix4f matrix);
     
 }