PDA

View Full Version : Need guidance...



genifer
09-14-2010, 03:43 AM
Hi, I'm a newbie in webGL, and I'm very excited to use it after looking at what it can do on a browser. I've just set it up on my browser a day ago (Tested on http://learningwebgl.com/blog/).

I've been researching all over the web, but still clueless to start.

I have a bit of background knowledge in python, java and javascript, but had never touched on OpenGL and C++ before.

So currently I'm looking for what path can I go through to use this wonderful tool.


Secondly, did anyone go to this tutorial before c3dl tutorial 2 (http://www.c3dl.org/index.php/tutorials/tutorial-2-a-simple-scene/)? I can't get it worked. I did everything of what it said, and I got this message.

18:40:5 Error: vert shader: ERROR: 0:1: 'gl_FrontColor' : undeclared identifier ERROR: 0:1: 'assign' : cannot convert from 'uniform mediump 4-component vector of float' to 'float' ERROR: 0:1: 'gl_TexCoord' : undeclared identifier ERROR: 0:1: 'gl_TexCoord' : left of '[' is not of type array, matrix, or vector ERROR: 0:1: 'assign' : cannot convert from '4-component vector of float' to 'float' ERROR: 0:1: 'gl_TexCoord' : left of '[' is not of type array, matrix, or vector ERROR: 0:1: 's' : field selection requires structure, vector, or matrix on left hand side ERROR: 0:1: 'gl_TexCoord' : left of '[' is not of type array, matrix, or vector ERROR: 0:1: 't' : field selection requires structure, vector, or matrix on left hand side ERROR: 9 compilation errors. No code generated.


I'm really clueless now, good suggestions are really appreciated.

Summary:
1) What are the paths of learning I should go through before I can use webGL?
2) Is there anything wrong with that tutorial? Or something wrong with my set up?

SteveBaker
10-13-2010, 08:01 PM
I would head over to the WebGL Wiki - find the example programs (the one that draws a teapot is a good place to start) - and start off by modifying them:

http://www.khronos.org/webgl/wiki/Main_Page

Canvas3D isn't the same thing as WebGL (and it's obsolete now that WebGL is the upcoming standard) - so I wouldn't expect anything in the c3dl tutorial stuff to work.

There are also some tutorial materials for WebGL at:

http://learningwebgl.com

Good Luck!

LordAshes
01-28-2012, 09:34 AM
Another solution if you want to create but don't want to (for now) learn a lot of WebGL specifics then you can use my WebGL Joint And Object Framework. It is basically a wrapper than provides simplified commands for loading objects, attaching objects to each other and bending objects with respect to each other. All of this without having to know almost anything regarding buffers, shaders, arrays, etc.

Having said that, the Framework is probably not a good start if you do want learn the down and dirty WebGL parts because, as I said, it is intended for getting things going in WebGL without really needing to understand WebGL.

If you are interested, the Framework is freely available, at:

http://webtable.byethost15.com/WebGl