Main Page | Report this Page
Computers Forum Index  »  Computer - Graphics - API (Opengl)  »  Jagged edges...
Page 1 of 1    

Jagged edges...

Author Message
pro-grammer...
Posted: Thu Oct 01, 2009 6:12 am
Guest
Im drawing two rows of RGB image textures (movie posters to be
exact)....

This is my perspective:
gluPerspective(45.0f, windowW/windowH, 0.1,
50);

I rotate these two rows by an angle.
glTranslate(..)
glRotate(..)
glTranslate(..)//reverse of the first translate

Due to the rotate, i get these terrible looking jagged edges on
1)the top side of the images in the first row
2)the bottom side of the images of the second
row

I have tried:
glClearDepth(1.0);
glDepthFunc(GL_LESS);
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_SMOOTH);
and
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH, GL_DONT_CARE);
and
glEnable(GL_POLYGON_SMOOTH);
glHint(GL_POLYGON_SMOOTH, GL_DONT_CARE);

None of the above worked. I dont see ANY improvement.

Does anyone know what my problem is and how it can be fixed or
improved?

Appreciate your help!
 
pro-grammer...
Posted: Thu Oct 01, 2009 6:17 am
Guest
One clarification: I am rotating the rows around its y axis
 
Skybuck Flying...
Posted: Thu Oct 01, 2009 11:46 am
Guest
Screenshot could help... did you set texture parameters ? (Linear that sort
of stuff)

Bye,
Skybuck.
 
Jean-Pierre Gygax...
Posted: Thu Oct 01, 2009 2:46 pm
Guest
Here's the code I use to find a pixel format supporting the full-screen
antialiasing mentioned by fungus. You may have to adapt a bit to make it
suit your reqs.

The value returned by this function must be passed to SetPixelFormat()
(the third parameter can apparently be left to NULL, though that is not
mentioned in the docs).

Also note that you can (and probably will have to) enable and disable
the multisampling with glEnable/glDisable(GL_MULTISAMPLING_ARB).

---------------------------

static int select_pixel_format(HDC hDC, bool double_buffered)
{
// Try to select a format that supports multisampling
int pixelFormats[32];
BOOL bStatus;
UINT numFormats;
float fAttributes[] = {0,0};
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, double_buffered ?
GL_TRUE : GL_FALSE,
WGL_SAMPLE_BUFFERS_ARB, GL_TRUE,
WGL_SAMPLES_ARB, 4,
0, 0
};
for (unsigned samples = 8; samples > 0; samples -= 2) {
iAttributes[19] = samples;
bStatus = wglChoosePixelFormatARB(hDC, iAttributes,
fAttributes,1, pixelFormats, &numFormats);
/* Bizarre: even though numFormats reports numbers like
4 or 2 here (on my system), only the first array entry
holds a usable pixel format value */
if (bStatus == GL_TRUE && numFormats > 0)
return pixelFormats[0];
}

// Fall back to standard method
PIXELFORMATDESCRIPTOR pfd;
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL
| PFD_GENERIC_ACCELERATED
| (double_buffered ? PFD_DOUBLEBUFFER : 0);
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cDepthBits = 32;
pfd.iLayerType = PFD_MAIN_PLANE;
return ChoosePixelFormat(hDC, &pfd);
}
 
pro-grammer...
Posted: Wed Oct 07, 2009 6:14 am
Guest
Correct me if I'm wrong:

1) FSAA can only be done using the GL_ARB_multisample extension.
2) If i dont have GL_ARB_multisample, the only way I can get it is by
changing my video hardware.

According to the specs in opengl.org, GL_ARB_multisample is part of
the opengl core since version 1.3
Unfortunately, although glGetString(GL_VERSION) tells me i have
version 1.4 on my desktop, glGetString(GL_EXTENSIONS) dosnt contain
GL_ARB_multisample. Why would that happen?

I have noticed in some forums complaints about having a good enough
card, but old gl libraries. Could that be my situation? How can I
check if my card supports a particular ogl extension? Or if my card
can support a newer ogl library.

Please forgive my if any of the above turn out to be stupid questions.
Im just trying to get some clarity here. Appreciate your help.
 
Jean-Pierre Gygax...
Posted: Wed Oct 07, 2009 5:51 pm
Guest
pro-grammer wrote:
Quote:
Correct me if I'm wrong:

1) FSAA can only be done using the GL_ARB_multisample extension.
2) If i dont have GL_ARB_multisample, the only way I can get it is by
changing my video hardware.

According to the specs in opengl.org, GL_ARB_multisample is part of
the opengl core since version 1.3
Unfortunately, although glGetString(GL_VERSION) tells me i have
version 1.4 on my desktop, glGetString(GL_EXTENSIONS) dosnt contain
GL_ARB_multisample. Why would that happen?

The code that I pasted has been reported to fail (meaning: to fall back
to the "standard method") on another PC equipped with a GeForce 9500.
What card are you using ?

Quote:
I have noticed in some forums complaints about having a good enough
card, but old gl libraries. Could that be my situation? How can I
check if my card supports a particular ogl extension? Or if my card
can support a newer ogl library.

This needs investigating. But I thought that the base OpenGL version (as
provided by OpenGL32.dll, which has been outdated for years and is not
being developed further by Microsoft) didn't matter and that the graphic
card driver alone was responsible providing extensions.

Clearly though, we are both missing something here.

-- Jean-Pierre
 
pro-grammer...
Posted: Thu Oct 08, 2009 8:00 am
Guest
My pc uses the default Intel graphics chip.... This is the info I
could find:

Intel(R) Graphics Media Accelerator Driver
Driver Version:6.14.10.4299
Accelerator in use: Intel(R) 82945G Express Chipset Family
Video Bios: 1217

glGetString returns:
VENDOR - Intel
RENDERER - Intel 945G
VERSION - 1.4.0 - Build 4.14.10.4299

so is there a problem with my card?

Jean, can you please specify what is the "standard method" of FSAA?
 
Jean-Pierre Gygax...
Posted: Thu Oct 08, 2009 5:59 pm
Guest
pro-grammer wrote:
Quote:
My pc uses the default Intel graphics chip.... This is the info I
could find:

Intel(R) Graphics Media Accelerator Driver
Driver Version:6.14.10.4299
Accelerator in use: Intel(R) 82945G Express Chipset Family
Video Bios: 1217

glGetString returns:
VENDOR - Intel
RENDERER - Intel 945G
VERSION - 1.4.0 - Build 4.14.10.4299

so is there a problem with my card?

I don't think so. Much more likely, we're missing some specific about
how to use the multisampling extension under Windows. I will look into
this as soon as I can, unfortunately I have something more urgent under
my wing right now.

Quote:
Jean, can you please specify what is the "standard method" of FSAA?

Sorry, I meant the "standard method" in my code (i.e. using the
ChoosePixelFormat() call instead of wglChoosePixelFormatARB() ).

-- JP
 
pro-grammer...
Posted: Fri Oct 09, 2009 12:54 pm
Guest
Thanks for that hint Jean.... After some googling, I came across
wglGetExtensionsStringARB()

I used this function, but it did not return any ARB multisample
extension either Sad...

Anyone has any other ideas as to why my gl 1.4 driver doesnt support
GL_ARB_multisample?
My os is win xp with SP3..
How do I find out if the problem is (a)the dll (b)the card driver or
(c)the graphics hardware?

Or are there other possible ways for anti aliasing? I am unable to
upload a snapshot... sorry about that...
 
pro-grammer...
Posted: Fri Oct 09, 2009 2:36 pm
Guest
Ok I kinda got my answer.

According to Intel(reg 945G):
"The latest version of OpenGL currently supported by the Intel®
Graphics Media Accelerator drivers is OpenGL 1.4 plus extensions. "

According to opengl.org, GL_ARB_multisample was part of the opengl
core since v1.3..

According to http://stackoverflow.com/questions/29311/which-3d-cards-support-full-scene-antialiasing
"Pretty much all cards since DX7-level technology (GeForce 2 / Radeon
7000) can do it. Most notable exceptions are Intel cards (Intel 945
aka GMA 950 and earlier can't do it; I think Intel 965 aka GMA X3100
can't do it either)."

I think Intel 945 claims to have ogl 1.4 drivers, but they dont
support multisampling(is that legal?)...

:(
 
Dave Eberly...
Posted: Fri Oct 09, 2009 5:43 pm
Guest
"pro-grammer" <akhil.malhotra at (no spam) gmail.com> wrote in message
news:b49929fe-53fd-45ac-b9fc-f944f889ac35 at (no spam) t11g2000prh.googlegroups.com...
Quote:
Thanks for that hint Jean.... After some googling, I came across
wglGetExtensionsStringARB()

I used this function, but it did not return any ARB multisample
extension either Sad...

Anyone has any other ideas as to why my gl 1.4 driver doesnt support
GL_ARB_multisample?
My os is win xp with SP3..
How do I find out if the problem is (a)the dll (b)the card driver or
(c)the graphics hardware?

Or are there other possible ways for anti aliasing? I am unable to
upload a snapshot... sorry about that...

Does your card report that it supports the GL_EXT_multisample extension?

--
Dave Eberly
http://www.geometrictools.com
 
Michael Bieber...
Posted: Fri Oct 09, 2009 6:18 pm
Guest
pro-grammer wrote:
Quote:
Thanks for that hint Jean.... After some googling, I came across
wglGetExtensionsStringARB()

I used this function, but it did not return any ARB multisample
extension either Sad...

Did you ever try "standard" programs, checking these things?

http://www.realtech-vr.com/glview/

Or even the helper utilities for glew:

http://glew.sourceforge.net/

Micha
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Nov 23, 2009 1:32 pm