glRotated doesnt work??

Hello,

the following code blits to my fbo. Works so far. But glrotated() has no effect. Why? Pls help. Thx!!!

w=paintInfo->width;
h=paintInfo->height;
// Gen Framebuffer
glGenFramebuffersEXT(1, &fbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
img=texture->Id();
// Bind Texture
//glGenTextures(1, &img);
glBindTexture(GL_TEXTURE_2D, img);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, img, 0);

paintInfo->SetOpenGLTextureMode( Alpha(), cForm, xForm.IsScaled(), texture );

GLenum status;
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
GLASSERT(status == GL_FRAMEBUFFER_COMPLETE_EXT);
glPushMatrix();

glRotated(xForm.rotation,0, 0, 1);
err=glGetError();

What do you mean no effect ?
glRotate only “multiply the current matrix by a rotation matrix” as written in the doc.
Do you draw any vertex to see the rotation ?

My draw code looks like this and comes right after. Works e.g. for non rotated drawing and even scales my texture. But no rotation:

SDL_CurrentVideo->glBegin( GL_QUADS );
{
	SDL_CurrentVideo->glTexCoord2f( texCoord[0].x,	texCoord[0].y );
	SDL_CurrentVideo->glVertex3i( bounds.xmin,				bounds.ymin,					openGLZ );

	SDL_CurrentVideo->glTexCoord2f( texCoord[1].x,	texCoord[1].y );
	SDL_CurrentVideo->glVertex3i( bounds.xmin+bounds.Width(), bounds.ymin,					openGLZ );

	SDL_CurrentVideo->glTexCoord2f( texCoord[2].x,	texCoord[2].y );
	SDL_CurrentVideo->glVertex3i( bounds.xmin+bounds.Width(), bounds.ymin+bounds.Height(),	openGLZ );
	
	SDL_CurrentVideo->glTexCoord2f( texCoord[3].x,	texCoord[3].y );
	SDL_CurrentVideo->glVertex3i( bounds.xmin,				bounds.ymin+bounds.Height(),	openGLZ );
}
SDL_CurrentVideo->glEnd();

when do you call this piece of code exactly?
well, anyway make sure it’s called after the call to glrotated() and there was no loadIdentity() in between, and also that the matrix mode is GL_ModelView.

Have you tried glRotatef instead, and if so do you see the same problems there? There is really no advantage to using the -d versions of functions, as your driver will work in regular floating point internally; best case result is that you don’t actually have the extra precision you think you’re getting; worst case is that it doesn’t work at all and gives you unwanted side-effects.

Yes I tried both. I didnt attach a depth buffer to fbo. Is this the problem?

andreas

I found it. It was related to my pic processing afterwards.
Everything discussed here works well.

Thanks for all help!!

andreas