Fixes to standard shaders compile errors.
authorchsieh <chester.developer@hotmail.com>
Sat, 18 Dec 2010 19:02:52 +0000 (11:02 -0800)
committerchsieh <chester.developer@hotmail.com>
Sat, 18 Dec 2010 19:02:52 +0000 (11:02 -0800)
Classes/Foundation/GraphicsServices/OpenGLServices.h
Classes/Foundation/GraphicsServices/OpenGLServices.m [new file with mode: 0644]
Classes/Foundation/OSInterface/LittlestViewController.m
Littlest.xcodeproj/project.pbxproj
Shaders/Shader.fsh
Shaders/Shader.vsh

index 838caca..f59fbac 100644 (file)
@@ -1,23 +1,20 @@
-//
-//  OpenGLServices.h
-//  Littlest
-//
-//  Created by Doris Chen on 12/11/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
 #pragma once
 
+#include "Foundation/Common/GlobalInclude.h"
+
 #include <OpenGLES/ES1/gl.h>
 #include <OpenGLES/ES1/glext.h>
 #include <OpenGLES/ES2/gl.h>
 #include <OpenGLES/ES2/glext.h>
 
+//typedef TextureHandle GLuint;
+/*
 class OpenGLServices
 {
 public:
        bool init();
        
 private:
-       
+  EAGLContext* mGLContext;
 };
+*/
diff --git a/Classes/Foundation/GraphicsServices/OpenGLServices.m b/Classes/Foundation/GraphicsServices/OpenGLServices.m
new file mode 100644 (file)
index 0000000..9afa6ac
--- /dev/null
@@ -0,0 +1,2 @@
+#include "OpenGLServices.h"
+
index 66fef57..b1ad024 100644 (file)
@@ -56,8 +56,8 @@ enum {
     else if (![EAGLContext setCurrentContext:aContext])
         NSLog(@"Failed to set ES context current");
     
-       self.context = aContext;
-       [aContext release];
+    self.context = aContext;
+    [aContext release];
        
     [(EAGLView *)self.view setContext:context];
     [(EAGLView *)self.view setFramebuffer];
index 76b10a4..e58de7d 100755 (executable)
@@ -22,8 +22,9 @@
                4B68588612BC288E005667D3 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B68588112BC288E005667D3 /* EAGLView.m */; };
                4B68588712BC288E005667D3 /* LittlestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B68588312BC288E005667D3 /* LittlestAppDelegate.m */; };
                4B68588812BC288E005667D3 /* LittlestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B68588512BC288E005667D3 /* LittlestViewController.m */; };
-               4B90648412B41E6500655D84 /* Standard.vsh in Sources */ = {isa = PBXBuildFile; fileRef = 4B90648312B41E6500655D84 /* Standard.vsh */; };
-               4B90648612B426FE00655D84 /* Standard.fsh in Sources */ = {isa = PBXBuildFile; fileRef = 4B90648512B426FE00655D84 /* Standard.fsh */; };
+               4B90648412B41E6500655D84 /* Standard.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 4B90648312B41E6500655D84 /* Standard.vsh */; };
+               4B90648612B426FE00655D84 /* Standard.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 4B90648512B426FE00655D84 /* Standard.fsh */; };
+               4BA0CD3712BD341500EBB6F0 /* OpenGLServices.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA0CD3612BD341500EBB6F0 /* OpenGLServices.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -72,6 +73,7 @@
                4B68588512BC288E005667D3 /* LittlestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestViewController.m; sourceTree = "<group>"; };
                4B90648312B41E6500655D84 /* Standard.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Standard.vsh; path = Shaders/Standard/Standard.vsh; sourceTree = "<group>"; };
                4B90648512B426FE00655D84 /* Standard.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Standard.fsh; path = Shaders/Standard/Standard.fsh; sourceTree = "<group>"; };
+               4BA0CD3612BD341500EBB6F0 /* OpenGLServices.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenGLServices.m; sourceTree = "<group>"; };
                8D1107310486CEB800E47090 /* Littlest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Littlest-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
                4B68587312BC27FD005667D3 /* GraphicsServices */ = {
                        isa = PBXGroup;
                        children = (
+                               4BA0CD3612BD341500EBB6F0 /* OpenGLServices.m */,
                                4B68587412BC27FD005667D3 /* OpenGLServices.h */,
                        );
                        path = GraphicsServices;
                        isa = PBXResourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               4B90648412B41E6500655D84 /* Standard.vsh in Resources */,
+                               4B90648612B426FE00655D84 /* Standard.fsh in Resources */,
                                2514C27B10084DCA00A42282 /* Shader.fsh in Resources */,
                                2514C27C10084DCA00A42282 /* Shader.vsh in Resources */,
                                28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
                        buildActionMask = 2147483647;
                        files = (
                                1D60589B0D05DD56006BFB54 /* main.m in Sources */,
-                               4B90648412B41E6500655D84 /* Standard.vsh in Sources */,
-                               4B90648612B426FE00655D84 /* Standard.fsh in Sources */,
                                4B68585B12BC1E97005667D3 /* LocklessRingBuffer.cpp in Sources */,
                                4B68585C12BC1E97005667D3 /* MemoryBitset.cpp in Sources */,
                                4B68585D12BC1E97005667D3 /* MemoryHeap.cpp in Sources */,
                                4B68588612BC288E005667D3 /* EAGLView.m in Sources */,
                                4B68588712BC288E005667D3 /* LittlestAppDelegate.m in Sources */,
                                4B68588812BC288E005667D3 /* LittlestViewController.m in Sources */,
+                               4BA0CD3712BD341500EBB6F0 /* OpenGLServices.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 21fa03a..14fe852 100644 (file)
@@ -1,11 +1,3 @@
-//
-//  Shader.fsh
-//  Littlest
-//
-//  Created by Doris Chen on 12/4/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
 varying lowp vec4 colorVarying;
 
 void main()
index d89afa7..2f42d90 100644 (file)
@@ -1,11 +1,3 @@
-//
-//  Shader.vsh
-//  Littlest
-//
-//  Created by Doris Chen on 12/4/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
 attribute vec4 position;
 attribute vec4 color;