-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question/Problem with gl::GLenum and #defines from gl.h #388
Comments
With your include of
|
Hello, kind regards, |
It seems like I missed your second question. // Omitting includes here
globjects::init([](const char* name)
{
return reinterpret_cast<glbinding::GetProcAddress>(wglGetProcAddress(name));
}); If you create your context using GLFW, you can use the initialization routine from the globjects examples: // Omitting includes here
globjects::init([](const char * name) {
return glfwGetProcAddress(name);
}); The idea of the function pointer you pass to globjects/glbinding is to be such a wrapper function you suggested. |
Hello,
I'm new to globjects and glbindings and it's an awesome library.
I have a question according to the examples and the general use of globjects with glfw.
There has to be a certain order of including the need header files as I can see in all examples.
Taken from texture example.
#include <glm/vec2.hpp>
#include <glbinding/gl/gl.h>
#include <glbinding/Version.h>
#include <glbinding-aux/ContextInfo.h>
#include <glbinding-aux/types_to_string.h>
#include <GLFW/glfw3.h>
#include <globjects/globjects.h>
#include <globjects/base/File.h>
#include <globjects/logging.h>
#include <globjects/Texture.h>
#include "ScreenAlignedQuad.h"
using namespace gl;
For example this piece of code won't compile, because GL_TEXTURE_2D is ambigious.
It's wether the GL_TEXTURE_2D somewhere defined in gl.h or it's the enum from globjects -> gl::GLenum::GL_TEXTURE_2D
globjects::Texture::createDefault(GL_TEXTURE_2D)
Even if I remove the using namespace globjects, this line won't compile.
I have to explicitly cast
globjects::Texture::createDefault((gl::GLenum)GL_TEXTURE_2D);
And how can I use the following with wglGetProcAddress instead of glfwGetProcAddress ?
This doesnt work. The compiler complains about invalid or incompatible types.
globjects::init([](const char* name)
{
return wglGetProcAddress(name);
});
Kind regards,
PonchoBob
The text was updated successfully, but these errors were encountered: