Bones + General

Hi there !
I have two questions, so I made a double-topic :whistle:

  1. How can I change AntiAliasing and Resolution at runtime ?
int iAttributes[] =
	{
		WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
		WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
		WGL_ACCELERATION_ARB,WGL_FULL_ACCELERATION_ARB,
		WGL_COLOR_BITS_ARB,24,
		WGL_ALPHA_BITS_ARB,8,
		WGL_DEPTH_BITS_ARB,16,
		WGL_STENCIL_BITS_ARB,0,
		WGL_DOUBLE_BUFFER_ARB,GL_TRUE,
		WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,
		WGL_SAMPLES_ARB,levelAA,
		0,0
	};

	// First We Check To See If We uCan Get A Pixel Format For 4 Samples
	valid = wglChoosePixelFormatARB(hDC,iAttributes,fAttributes,1,&pixelFormat,&numFormats);

I always destroy the current window and create a new one. But then all textures (with “glGenTextures()”) are gone…
How can I avoid that ?

  1. How can I deform my objects with bones ? If I have all neccessary values, how must I “use” them (rotation,scaling,transformation,…) ?

Thanks for your help in advance :wink:

  1. I don’t know

  2. This is called skinning:
    http://graphics.ucsd.edu/courses/cse169_w05/3-Skin.htm
    http://www.okino.com/conv/skinning.htm

wow, thanks for the fast reply ^^

I’d look at that tomorrow, but it looks interesting.
I thougt skinning means texturing… :eek:

  1. How can I change AntiAliasing and Resolution at runtime ?

You don’t. Once you have created your OpenGL context, the framebuffer is set. You must destroy your OpenGL context (and window) in order to create a new one.

  1. to avoid destruction of the OpenGL resources (textures,…) you can share them with another OpenGL context that you never destroy/recreate.

Well, one is render-to-FBO. That is, instead of deleting/creating a new window with the desired HW antialiasing, allocate a non-antialiased window at startup (that never needs changed), and then behind the scenes you can allocate FBO render targets with different antialiasing depending on the antialiasing config. Then you render to FBO instead of to the window. At the end of your frame, you downsample and copy the FBO contents to the main framebuffer and then call swapbuffers.

When you need to change AA configs, you merely delete/create a new FBO render target (all unbeknownst to the user) – the main on-screen window doesn’t need to change.

  1. How can I give a FBO Aliasliasing ?
    But why do I have to downsample ?
    And how do I copy the FBO contents to the main framebuffer ?

    Sorry, but I dond’t use FBO so much… :o

  2. So which values do I exactly need to use scaling/rotation/location ? Only the matrix or do I need the roll value or lenght of my bone ?
    And how do I have to deal with linked bones ?

    Sorry, but I don’t understand that…

?

How can I give a FBO Aliasliasing ?
But why do I have to downsample ?
And how do I copy the FBO contents to the main framebuffer ?

The Wiki. Use it.

Thx.

And the armature ?
I don’t understand which values I need… and how to use them :o

Please help :o