cginternals / cginternals/globjects
Question/Problem with gl::GLenum and #defines from gl.h
- Dominant language
- C++
- Stars
- 563
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
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
#include
#include
#include
#include
#include
#include
#include
#include
#include
#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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.