banner
Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Programming OpenGL Notes
If you appreciate the information found on this website, please drop me a line!

Who's Online

We have 22 guests online
Content View Hits : 1157086
moon and stars
How did you find my site?
 
How often do you answer random online questions?
 

Random Quote

Everything should be made as simple as possible, but not simpler.
--Albert Einstein
P7160011
107_0741
P1010010
100_1912

OpenGL Notes

Monday, 04 April 2005 08:29
The Open Toolkit Library | OpenTK - The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenCL and OpenAL.

Repeat a texture in OpenGL

When you want to repeat a small texture on a large quad without drawing the quads yourself.
Bind to the texture as usual and make sure you aren't clamping.
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);

Then when drawing your geometry, for instance a quad:
glBegin(GL_QUADS);<br/>
glTexCoord2f(0, 0); glVertex3f(-1, -1, -0.5f);<br/>
glTexCoord2f(32, 0); glVertex3f( 1, -1, -0.5f);<br/>
glTexCoord2f(32, 32); glVertex3f( 1, 1, -0.5f);<br/>
glTexCoord2f(0, 32); glVertex3f(-1, 1, -0.5f);<br/>
glEnd();
The glTexCoord2f() controls how many times the texture is repeated.  Image coordinates are typically from 0 to 1 in OpenGL.  So the above calls repeat the texture 32 times in both the x and y directions.

Save screen to disk

OpenGL - Writing the framebuffer to disk

Libraries and Toolkits
OpenGL for Windows by Silicon Graphics - Download
ODE - Open Dynamics Engine - open source, high performance library for simulating rigid body dynamics
OpenAL - Cross-Platform 3D Audio
GLUT for WIN32
SDL - Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
OpenSceneGraph - open source C++ scene graph.
The OpenGL Extension Wrangler Library
GLUT
OglExt - A LGPL library for accessing OpenGL extensions.
GLEW: The OpenGL Extension Wrangler Library

Modeling and 3d tools
Blender - an open source tool for modeling, animation, etc

Web Resources
Image Morphing based on this work
Thin Plate Spline editor - an example program in C++
NeHe OpenGL Tutorials
stereo geometry in OpenGL
OpenGL Redbook Samples


SDL
SDL - Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.


WebGL - OpenGL in your browser

WebGL - OpenGL ES 2.0 for the Web
WebGL Samples/Demos and other bits at Vladimir Vukićević
The Lessons | Learning WebGL - The first ten are based on the well-known NeHe OpenGL tutorials, but I’ve diverged since then. Here are the ones so far.
Last Updated on Friday, 10 June 2011 09:23