pouët.net

Go to bottom
glew4kb
screenshot added by tomohiro on 2012-06-24 12:02:01
platform :
type :
release date : n/a
  • 3
  • 3
  • 0
popularity : 52%
 52%
  • 0.50
alltime top: #25323
added on the 2012-06-24 12:02:01 by tomohiro tomohiro

popularity helper

increase the popularity of this prod by spreading this URL:

or via: facebook twitter pinterest tumblr

comments

- What is glew4kb?
Automate OpenGL extension initialization for 4k intro.

- Dependency
The OpenGL Extension Wrangler Library (GLEW) (http://glew.sourceforge.net/)

- Platform
C++ compiler which can use OpenGL and be used for 4k intros.
But currently glew4kb is only tested with VC++2008.

- How to install
glew4kb is a header only library.
Please put it somewhere your compiler can find.
And install GLEW if you didn't installed it.

- How to use
You need both debug build and release build(build for 4k intro).
- Debug build
- Use standard C/C++ library.
- Initialize OpenGL extensions with GLEW.
- Include glew4kb.hpp after GL/glew.h
- Release build
- Don't link standard C/C++ library.
- Don't use GLEW.
- Don't include glew4kb.hpp
- Include glew4kb_exts.h

Please execute debug build until all OpenGL extensions are called.
Then, all OpenGL extensions are recorded in glew4kb.
When your program is quitting, destractor of static object in glew4kb is called,
and it output glew4kb_exts.h in current directory.
(If you don't call destractor of static object, please call glew4kb::output())
There is a code initialize OpenGL extensions for 4k intro in that file.

- Options
You can set options by #define following macros before #include <glew4kb.hpp>
- GLEW4KB_LIST
If you don't define this macro, glew4kb do nothing.
- GLEW4KB_METHOD_ID
Select a function to generate code.
There are 5 functions to generate code in glew4kb.
Most smallest one varies depending on number of OpenGL extensions and
bit patterns of your program.
- GLEW4KB_EXCLUDE_LIST
Specify OpenGL extensions you want to exclude.
If there are functions like glGetShaderInfoLog
which you want to use in Debug build but not in Release build,
set them in GLEW4KB_EXCLUDE_LIST.
Example and default value:
# define GLEW4KB_EXCLUDE_LIST \
"glIsShader", "glGetShaderiv", "glGetShaderInfoLog", \
"glIsProgram", "glGetProgramiv", "glGetProgramInfoLog", \
"glCheckFramebufferStatus"


Acknowledgment:
w23, Thank you for telling me how do you initialize OpenGL extensions.
Your code made my 4k intro smaller.
I also referred code in '1k/4k demo framework and examples' in iq's site.
glew4kb can generate code which initialize OpenGL extension in their way.
added on the 2012-06-24 12:05:13 by tomohiro tomohiro
I fail to see the usefulness here..
added on the 2012-06-24 12:54:52 by ferris ferris
I can find this useful taking into account the pain of manually managing the import list.

I just wish the code was cleaner with no comments in Japanese.
rulez added on the 2012-06-24 13:13:08 by TLM TLM
O_o--b
rulez added on the 2012-06-24 16:24:31 by aha aha
For the japanese comments. :D
rulez added on the 2012-06-25 10:43:07 by Exin Exin
what ferris said

lists containing this prod

submit changes

if this prod is a fake, some info is false or the download link is broken,

do not post about it in the comments, it will get lost.

instead, click here !

[previous edits]

add a comment

Go to top