This is a real university course and im lookin at it seriously. So if spring is still goin in about 2 years time, you will have a new team member SY (asside from my unofficial work in sortin out the OTA music into a setup you can use)
Good for you! These topics are incredible... the classes can give you the information but games development is yet another step above that. Practice practice practice! Write demos, read books, etc. Premier Press's "Game Development Series" of books are invaluable to learn more on these topics and get a look at in depth methods actually used today (http://www.premierpressbooks.com/ptr_ca ... ment&all=1) I personally have 7 or 8 of these.[/url]
Agormlessfool lol thats ur full name aint it
And yes, im from the UK. Manchester to be precise
and Jorm, i dont plan on touching the code till i learn some. Im tryin to work the music into a smaller size without reducing quality, so you can still use it w spring..........
Actully, youre almost right! Its aGorm Isafol. It stems from the following:
A (obvious...) Gorm (comes from the word gormless : This is a good old Lancashire dialect word meaning ├óÔé¼┼ôlacking sense or discernment├óÔé¼┬Ø. ) is a Fool (a person who behaves in a silly way without thinking)
I couldn't stand school and I certanly cant be doin with computers, which is why I work with computers all day. (ask almost anyone in the IT proffesion, they all hate computers...). Which is why i'd never be able to get a qualification in them... Im miles away from manchester...
i dont plan on touching the code till i learn some.
The only way to learn how to programme is to do it, sure you'll probably crash your computer once or twice, or if your like me an unholy amount, but it will help you learn a tremendously.
P.S. Mind asking your tutor/teacher/lecturer what values glReadPixels actually puts in the pointer you pass to it?
it depends on the byte format you request, as well as which buffer you want to get the data from (ie stencil, depth, etc). It gets the data from the current rendering context (basically, what you are currently rendering to) from the rectangle you specify. Taken directly from the man pages, the arguments are as follows.
void glReadPixels(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLvoid *pixels)
PARAMETERS
x, y Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.
width, height Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
format The format of the returned pixel data. The allowable values are GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA, GL_BGR_EXT, GL_BGRA_EXT, GL_ARGB_I3D, GL_422_EXT, GL_422_REV_EXT, GL_422_AVERAGE_EXT, and GL_422_REV_AVERAGE_EXT.
type Specifies the data type for pixel data. The allowable values are GL_BITMAP, GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2_EXT, GL_UNSIGNED_BYTE_2_3_3_REV_EXT, GL_UNSIGNED_SHORT_5_6_5_EXT, GL_UNSIGNED_SHORT_5_6_5_REV_EXT, GL_UNSIGNED_SHORT_4_4_4_4_EXT, GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, GL_UNSIGNED_SHORT_5_5_5_1_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT, GL_UNSIGNED_INT_8_8_8_8_EXT, GL_UNSIGNED_INT_8_8_8_8_REV_EXT, GL_UNSIGNED_INT_10_10_10_2_EXT, and GL_UNSIGNED_INT_2_10_10_10_REV_EXT.
glReadPixels(x, y, 1, 1, GL_RED, GL_UNSIGNED_BYTE, &pixel);
That will return me the red ranging from 0-255 of the pixel I clicked?
And therefore if I set that pixels colour by an array item number then the red value should be the same as my the array number used to define it? and therefore I can use it to access the array element?
No, seriously my OGL skills aren't quite up to fiddling with buffers, I'm using it to figure out what point in a height map that I clicked, ie, if you click x5,y3 you would have clicked heightmap[x*width+y], so I could then go heightmap[x*width+y]+=0.1; etc etc. To define the selection box colour I used glColor3f(var,var,var); with var=x*width+y;.
Ahhh, I see what you're saying. Yes, glReadPixels would do the trick, but I suggest doing something a little different. Store the heightmap information locally in memory, and avoid the gl call to get that information on the fly. Then, update the color when you click that pixel.