GL_ALL_ATTRIB_BITS missing?

View: New views
5 Messages — Rating Filter:   Alert me  

GL_ALL_ATTRIB_BITS missing?

by tom fogal-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My GLEW seems to be missing a define for this.

It's in auto/core/GL_VERSION_1_1.  Yet I can't find it's definition
anywhere on the opengl.org spec pages -- e.g. in gl.tm or gl.spec, nor
is it in the draft gl3.h header.

Yet it comes with my nvidia driver.  Further, if I copy its defined
value and use it in glPushAttrib, it does what I want when rendering
through Mesa softpipe.  Presumably it would work on my actual GPU as
well, though I haven't tested.

Also of interesting note, the define given by my nvidia driver seems
off by a few bits. few == 12 in this case:

  tf@shigeru glew grep ALL_ATTRIB_BITS auto/core/*
  auto/core/GL_VERSION_1_1:  GL_ALL_ATTRIB_BITS 0x000fffff
  auto/core/GL_VERSION_1_1:  GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
  tf@shigeru glew grep ALL_ATTRIB_BITS /usr/include/GL/gl.h
  #define GL_ALL_ATTRIB_BITS                0xFFFFFFFF
  #define GL_CLIENT_ALL_ATTRIB_BITS         0xFFFFFFFF
  tf@shigeru glew grep ALL_ATTRIB_BITS ~/dev/mesa/include/GL/*
  /home/tfogal/dev/mesa/include/GL/glew.h:#define GL_ALL_ATTRIB_BITS 0x000fffff
  /home/tfogal/dev/mesa/include/GL/glew.h:#define GL_CLIENT_ALL_ATTRIB_BITS
  0xffffffff
  /home/tfogal/dev/mesa/include/GL/gl.h:#define GL_ALL_ATTRIB_BITS
  0x000FFFFF
  /home/tfogal/dev/mesa/include/GL/gl.h:#define GL_CLIENT_ALL_ATTRIB_BITS
  0xFFFFFFFF

My GLEW is admittedly pretty hacked up at this point, so it could just
be something I've screwed up.  After looking into it though, I'm not
even sure if it *should* be there.

Could I get confirmation:
  . That it's not in GLEW 'cause *I* broke something
  . That the define does exist and I'm not just working too late
  again..

Thanks,

-tom

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
glew-coders mailing list
glew-coders@...
https://lists.sourceforge.net/lists/listinfo/glew-coders

Re: GL_ALL_ATTRIB_BITS missing?

by Nigel Stewart-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom,

 > My GLEW seems to be missing a define for this.

It's there for my (closer to TOT) GLEW, and
for Apple too...

include/GL/glew.h
#define GL_ALL_ATTRIB_BITS 0x000fffff

/System/Library/Frameworks/OpenGL.framework/Headers/gl.h
#define GL_ALL_ATTRIB_BITS                0x000fffff

 > . That it's not in GLEW 'cause *I* broke something

Your tree seems broken.

 > . That the define does exist and I'm not just working too late
 > again..

It does exist.

And for a hint of why there are bits missing:
http://www.opengl.org/registry/specs/EXT/misc_attribute.txt

- Nigel


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
glew-coders mailing list
glew-coders@...
https://lists.sourceforge.net/lists/listinfo/glew-coders

Re: GL_ALL_ATTRIB_BITS missing?

by tom fogal-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Nigel,

Nigel Stewart <nstewart@...> writes:
>  > My GLEW seems to be missing a define for this.
[snip]
>  > . That it's not in GLEW 'cause *I* broke something
>
> Your tree seems broken.
>
>  > . That the define does exist and I'm not just working too late
>  > again..
>
> It does exist.

Thanks for the clarification && the link!  I did not know about that
extension previously.

I'll make sure this is resolved/working before posting a patch series
for review.  I guess I should get glean/piglit up and running at some
point.. is that generally what's done for testing a release?  Or is
there just such a large set of apps that, "if it works with all of
these, it must be good"?

-tom

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
glew-coders mailing list
glew-coders@...
https://lists.sourceforge.net/lists/listinfo/glew-coders

Re: GL_ALL_ATTRIB_BITS missing?

by tom fogal-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks again for the help, Nigel.

tom fogal <tfogal@...> writes:
> My GLEW seems to be missing a define for this.

In my local GLEW, I load every function pointer dynamically.  This
includes OpenGL 1.1 functionality.  As such, instead of hardcoding
all of these defines in an auto/src header file, I created a
core/GL_VERSION_1_1 and let the function prototypes (+ function
pointers) get autogenerated.

In generating GL_VERSION_1_1 I used '0x000fffff' for its definition
(I think I just copied it from an official header from opengl.org or
the like).  The parsing code was not setup to recognize lowercase
hexadecimal characters for #defines.

The attached patch fixes a regex in the parsing code.

-tom


From 6b9abbefe905b3fe37f693f1b3597ff308c4a43b Mon Sep 17 00:00:00 2001
From: Tom Fogal <tfogal@...>
Date: Fri, 31 Jul 2009 19:47:38 -0600
Subject: [PATCH] Fix core parsing issue.

0x000fffff wasn't recognized as a valid definition: the matching
regex was only accounting for / allowing uppercase hex digits.

I left in some debug statements to stderr which should never get
hit, but would have helped me narrow this down sooner.
---
 auto/bin/make.pl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/auto/bin/make.pl b/auto/bin/make.pl
index 5982321..527fccb 100755
--- a/auto/bin/make.pl
+++ b/auto/bin/make.pl
@@ -10,7 +10,7 @@ my %regex = (
     extname  => qr/^[A-Z][A-Za-z0-9_]+$/,
     exturl   => qr/^http.+$/,
     function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
-    token    => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-F]+|[A-Z][A-Z0-9_]*)$/,
+    token    => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+|[A-Z][A-Z0-9_]*)$/,
     type     => qr/^typedef\s+(.+)\s+([\*A-Za-z0-9_]+)$/,
     exact    => qr/.*;$/,
 );
@@ -111,6 +111,8 @@ sub parse_ext($)
                     rtype => $return,
                     parms => $parms,
                 };
+            } else {
+                print STDERR "'$_' matched no regex.\n";
             }
         }
     }
@@ -133,6 +135,8 @@ sub output_tokens($$)
             hex ${$tbl}{$a} <=> hex ${$tbl}{$b}
         } keys %{$tbl};
         print "\n";
+    } else {
+        print STDERR "no keys in table!";
     }
 }
 
--
1.5.6.5


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
glew-coders mailing list
glew-coders@...
https://lists.sourceforge.net/lists/listinfo/glew-coders

Re: GL_ALL_ATTRIB_BITS missing?

by Nigel Stewart-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom,

The change is in as revision 556.

- Nigel

> In generating GL_VERSION_1_1 I used '0x000fffff' for its definition
> (I think I just copied it from an official header from opengl.org or
> the like).  The parsing code was not setup to recognize lowercase
> hexadecimal characters for #defines.


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
glew-coders mailing list
glew-coders@...
https://lists.sourceforge.net/lists/listinfo/glew-coders