glew4kb | ||||||||
---|---|---|---|---|---|---|---|---|
|
||||||||
|
popularity : 54% |
|||||||
alltime top: #27552 |
|
|||||||
added on the 2012-06-24 12:02:01 by tomohiro |
popularity helper
comments
I fail to see the usefulness here..
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.
I just wish the code was cleaner with no comments in Japanese.
O_o--b
For the japanese comments. :D
what ferris said
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 !
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.