Jump to content
  • Advertisement
Sign in to follow this  
Wyx

OpenGL Enabling Multisample with GLEW?

This topic is 4585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings, I'm fairly new with openGL/C++, but have been learning quickly. I've followed a good majority of the NeHe tutorials (along with many others) and have a noobish understanding of things. My question is, how do I enable multisampling using GLEW? I'm using the Nehe basecode, which has a file structure like so: Source Files: -Example.cpp (includes Init, Update, Render, etc.) -Core.cpp (same as Nehe.cpp, sets up window, etc.) Header Files: -Core.h (same as Nehe.h) Now, I also have a few other includes, that setup lighting, objects, etc for easy loading. I have a log file system, and I use this to check for extension support, and write error/success to the log file. I've read a few tutorials, articles, and skimmed over source code, but none of them really make the light bulb click on in my head. I'd be greatful if anyone could give me a simple breakdown on how to do this ^^

Share this post


Link to post
Share on other sites
Advertisement
Hi,

GLEW just sets up OpenGL extensions, not much else :b
But here is an extension hat lets you do multisampling:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/multisample.txt

-Andrew

Share this post


Link to post
Share on other sites
Fox,
thanks for the reply, though I already had an understanding of that; And more, I think... I also thought that GLEW made it easy to work with extensions in GENERAL. I've looked at source and followed tutorials that explain using extensions, and they have everything coded out, like for example lesson 46 at Nehe. He has 2 files, both pertaining to ARB_multisample (source and header).

Now, looking at other source/tutorials, which use GLEW, there is alot less coding, but they all do it differently and I can't figure out the differences enough to pinpoint the basic way of doing it. Now, I read an Nvidia article on ARB_multisample, and it walks you through the process... It just isn't very "how, where, why" about it. Aimed more towards the advanced I guess.

Through everything though, I think I understand what I need to do:

1. Make sure the extension is available/supported
2. Setup the extension (this is where I'm lost)
3. Enable the extension (also lost here, can't set it up, can't really enable it)

I can check for extension support, it's just the whole setup/enable thing that nails me. I'd like to have seperate files for this, for example Multisample.cpp/Multisample.h for easy updating and modification. Basically after all that useless reiteration, I need to know how to setup and enable an extension, if possible ARB_multisample in particular.

On a side note, the extension registry is very helpful in understanding the workings of extensions, but for a beginner like me, not really a complete "how to" when it comes to implementing an extension. Perhaps you know of some tutorials that walk you through setting this all up, using GLEW of course... Thats the main question, is how do I do all this with GLEW. I'm not an egghead, I've been searching for 3 days now, on top of a hunt I did last month. Been to flipcode, here at gamedev, gametutorials, the gpWiki, etc. etc. Even read numerous docs from college kids and stuff from Nvidia... Just have yet to find somewhere that says: "Here, this is how you do it with GLEW." Something like a basic tutorial on making your first cube with GLUT.

Sorry for all that blabbering :P

Share this post


Link to post
Share on other sites
See now, I tried that too, but only after checking for support. I haven't been able to "setup" the multisampling- or does GLEW do that automatically? I mean, I want to be able to specify 2x, 4x, etc. After just using glEnable(GL_MULTISAMPLING) everything was still aliased. I tried putting my graphics settings (unded the desktop properties) to "Application Controlled" and tried putting 2, 4, etc but still noticed no change. So I assume using glEnable didn't work. I read that if you just "enable" multisampling that it does fullscreen, so I'm still at a loss here... The stage I'm at now: I check for support, init GLEW, and enable multisampling. After reading all the tutorials previously stated and looking back over source examples for the nTH time, I still think I need to be setting up the multisampling before init'ing or enabling. Am I wrong?

EDIT:
error C2065: 'GL_MULTISAMPLING' : undeclared identifier

GL_MULTISAMPLE ^^

Also, you can download my source/binary at:
http://www.avlabsdesign.com/thelife/downloads/AVEngine%20Alpha.zip

I did actually notice something odd when I did glEnable(GL_MULTISAMPLE), and that was a strange "banding" around the edges of the cube, almost like it's being offset (which is why I believe I need to do some setup) and it runs a little... odd. Arrow keys control the cube's rotation BTW, you have to rotate it to see the effect I'm talking about. I have a GeforceFX 5600XT in case that helps any.

[Edited by - Wyx on January 29, 2006 9:38:33 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!