In your resize function:
move
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
before the first "if".
Type: Posts; User: uruk
In your resize function:
move
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
before the first "if".
You could also use kdialog (for kde) or zenity (for gnome) instead of xmessage.
In function VertexBuffer::draw() you have
glVertexPointer(3, GL_FLOAT, 0, 0);
It should be:
glVertexPointer(3, GL_FLOAT, 3*sizeof(float), 0);
A simple method is (R,G,B) dot3 (0.3,0.3,0.3).
It means "draw 3 vertices starting from index 0" i.e. vertices 0, 1 and 2.
For a "fade to black" effect you could just animate the alpha value of a full screen black quad.
glDrawArrays(GL_TRIANGLES, 0, 3);
You only have 3 vertices, not 4...
Ahem...
gl.glTexImage2D(tmp[0], 0, GL.GL_RGB, tex.getWidth(), tex.getHeight(), 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, tex.getPixels());
it should be
I think this is what you need:
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR);
I don't think you will find that book online, but if you want to learn GLSL you could start with TyphoonLabs GLSL Course.
A simple tutorial here (Cg and GLSL).
Use glTexSubImage2D .
Add in the FormCreate function, before you call SetupRC(), the lines:
glViewport(0,0,ClientWidth,ClientHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();...
DDS loading tuturial
In a BMP file colors are in BGR format not RGB... You should swap the bytes...
Ummm... Try to set the color depth of your image to 24 bpp (16.7 mil. colors).
You can upload your image here , then use the IMAGE button when posting a reply.
As for your problem, hmmmmm... I guess you could move a bright red cylinder over the blood vessel.
Like this:
...
OpenGL=Open Graphics Library so it has no networking functions.
I would recommend SDL_net .
GL_MODELVIEW
NeHe provides some 40 tuts. Download them and study them.
Yes. I think that's software rendering. Check your OpenGL initialisation code (PIXELFORMATDESCRIPTOR on Win32).
Also call glGetString(GL_RENDERER). If it returns something like PFD_GENERIC_blahblah...
You will have to draw the caps. Two disks (gluDisk) one at the bottom and one at the top of your cylinder.
HERE! But SHHHHH! Don\'t tell anyone! .