Jump to content
  • Advertisement
Sign in to follow this  
maxstrax

OpenGL GLew usage process mistake?

This topic is 2953 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

Dear All,

I am a student of computer science, and I am developing a C++ project, in Visual Studio 2008, that is using OpenGL for visualization, MFC for windowing (as shared library) and ffmpeg for video support. I am utilizing a Randeon HD4800 for development/debugging

I believe that I have taken all the steps to setup Glew(1.5.6):
Installed
glew.h at VC2008 include/GL directory,
glew32.lib and glew32s.lib at lib directory,
glew.dll at WINDOWS/system and system32 directory- I was not sure about where to place it-,
included <GL/glew.h> and right after <Gl/GLU.h>,
added glew32.lib glu32.lib opengl32.lib on the additional dependancies tab,
created a valid OpenGL context on a CWndFrame's OnCreate handler,
called glewInit right after OGL context creation, and abort if it returned anything else other than GLEW_OK.
Checked all the extensions I am using with glewinfo, and there was none missing.

However anything else other than OpenGL 1.1 (or 1.0) functionality - meaning everything which is based on pointers initialized by glewInit - is not initialized (Access violation at address 0x0000000).

Is there something, in the above process, that I missed?
Is there a possibility MFC might hinder somehow Glew operation? I am asking because, before MFC, I used WINAPI to create a dummy window for my tests and it was functioning as it should.

If my post is not very clear, please reply, to post the code responsible, if that would help

Thank you in advance for your time,
Marios Katsigiannis

P.S. I am posting this because no matter where I searched, I was unable to find a solution.

Share this post


Link to post
Share on other sites
Advertisement
What version of GL are you getting? Call glGetString(GL_VERSION)
call glGetString(GL_RENDERER)

It doesn't matter if you use MFC or WinAPI or Qt or GLUT or SDL or whatever.

Share this post


Link to post
Share on other sites
glGetString(GL_VERSION) -> 1.1.0
glGetString(GL_RENDERER) -> gdi generic

I placed the calls right after glewInit, which was successful.



[Edited by - maxstrax on October 19, 2010 3:35:00 AM]

Share this post


Link to post
Share on other sites
V-man, thank you for your question, I was not using the correct pixel format descriptor, and forgot to check if ChoosePixelFormat failed.
Problem solved
now it shows 3.3.something compatibility and the correct device

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!