From 760761bbccb2b6915a33551f4812b09e2ef9316c Mon Sep 17 00:00:00 2001 From: "gman@chromium.org" Date: Fri, 8 Jan 2010 23:41:11 +0000 Subject: This change removes CG from O3D and uses GLSL instead of HLSL. The current "hack" for shaders is that the shader string you supply to Effect::LoadFromFXString requires the lines // #o3d SplitMarker \n" Above which is the vertex shader and below which is the fragment shader. Since GLSL has no semantics the names are used for semantics so to get an automatically supplied worldViewProjection you must name the uniform worldViewProjection as in uniform mat4 worldViewProjection Similarly for attributes (vertex streams) you must name them to match O3D semantics as in attribute vec4 texcoord1 attribute vec3 normal etc. Included in this is one working sample in o3d/samples/hellocube-glsl.html Other things: Added a glsl field to clientInfo so that a program can check if it needs to supply GLSL or HLSL. eg client.clientInfo.glsl == true Updated the O3D libraries to store that info in o3djs.base.glsl so that the libaries can be modified to supply GLSL if we want. Note: To run this on windows you must copy glew32.dll and glut32.dll to ...\Mozilla\plugins To get this to actually work in GLES2 will require (*) renaming a few functions (*) telling O3D there is no NPOT support or if possible no NPOT support unless the texture has only 1 level. (*) removing LargeGeometry and FloatingPointTexture support. (*) Making it link with the GLES2 code Review URL: http://codereview.chromium.org/527028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35845 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/tests/tests.gyp | 1 - 1 file changed, 1 deletion(-) (limited to 'o3d/tests') diff --git a/o3d/tests/tests.gyp b/o3d/tests/tests.gyp index 6593ec1..67118a2 100644 --- a/o3d/tests/tests.gyp +++ b/o3d/tests/tests.gyp @@ -105,7 +105,6 @@ ['renderer == "gles2"', { 'dependencies': [ - '../build/libs.gyp:cg_libs', '../build/libs.gyp:gles2_libs', ], }, -- cgit v1.1