Results 1 to 3 of 3

Thread: Qt + OpenGL Extensions

  1. #1
    Fidel Cusak is offline Member
    Join Date
    Jun 2009
    Posts
    93
    Rep Power
    3

    Default Qt + OpenGL Extensions

    Hello,

    J `s`'d need you like me some advice concerning the use of OpenGL extensions in QT.
    Then voila, it is recommended (I think he) d `load autommatique use GLEW to directly load all extensions.

    However, there is a problem with inclusion of `error as before declaring gl.h glew.h. But for certain uses QT widget `s inclusion of these files gl.h. .. Thus if I have two files that I want to use features of the extension and glew and that these same files must be included in another, there is always this problem of `inclusion.

    L `Another method is to load the functions manually. Is this the right way to do?

    Code:
    1.	main.h
    2.	
    3.	# include <GL\glext.h>
    4.	
    5.	PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
    6.	PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
    7.	
    8.	glActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress ( "glActiveTextureARB");
    9.	glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress ( "glMultiTexCoord2fARB");
    Code:
    1.	another file:
    2.	
    3.	
    4.	extern const PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
    5.	extern const PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
    Thank you.

  2. #2
    Join Date
    Jun 2009
    Posts
    88
    Rep Power
    3

    Default

    Since you contacted me by PM, I can just tell you what I did was via GLEW, but it was a project out QT.

    You can try to pass through a header which then included glew.h gl.h before the QT headers.

  3. #3
    Fidel Cusak is offline Member
    Join Date
    Jun 2009
    Posts
    93
    Rep Power
    3

    Default

    Thank you for the answer. N `having not really find the answer to the problem of multiples inclusions and Glew, I have choose to load the function pointers of the extension manually (with the loading of windows).

    Thank you.

Similar Threads

  1. Mac OS X and OpenGL 3.0 that advance
    By Karen Austin in forum Latest Hardware News
    Replies: 0
    Last Post: 01-14-2010, 06:43 AM
  2. What is an opengl ?
    By Zanetta Xever in forum Software Jargons
    Replies: 0
    Last Post: 11-20-2009, 07:49 AM
  3. Vertex Buffer Object - OpenGL
    By Jashawn Petijohan in forum Programming
    Replies: 2
    Last Post: 10-29-2009, 12:09 PM
  4. OpenGL 3.2 Released
    By samantha lucas in forum Latest Hardware News
    Replies: 0
    Last Post: 08-04-2009, 06:10 AM
  5. Real Basic update adds OpenGL support for 3-D
    By vivian rodriquez in forum Latest Hardware News
    Replies: 0
    Last Post: 07-08-2009, 07:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48