Browse Source

TESTING: Add DGL_USE_OPENGL3 macro

pull/310/head
falkTX 3 years ago
parent
commit
9b838a67d2
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      dgl/Makefile
  2. +4
    -0
      dgl/src/WindowPrivateData.cpp

+ 4
- 0
dgl/Makefile View File

@@ -13,6 +13,10 @@ BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc -DDONT_SET_USING_DGL_NAMESPACE -Wno-un
BUILD_CXX_FLAGS += -Isrc/pugl-upstream/include
LINK_FLAGS += $(DGL_LIBS)

ifeq ($(USE_OPENGL3),true)
BUILD_CXX_FLAGS += -DDGL_USE_OPENGL3
endif

# TODO fix these after pugl-upstream is done
BUILD_CXX_FLAGS += -Wno-attributes -Wno-extra -Wno-missing-field-initializers
ifneq ($(MACOS),true)


+ 4
- 0
dgl/src/WindowPrivateData.cpp View File

@@ -234,6 +234,10 @@ void Window::PrivateData::initPre(const uint width, const uint height, const boo
puglSetViewHint(view, PUGL_IGNORE_KEY_REPEAT, PUGL_FALSE);
puglSetViewHint(view, PUGL_DEPTH_BITS, 16);
puglSetViewHint(view, PUGL_STENCIL_BITS, 8);
#ifdef DGL_USE_OPENGL3
puglSetViewHint(view, PUGL_USE_COMPAT_PROFILE, PUGL_FALSE);
puglSetViewHint(view, PUGL_CONTEXT_VERSION_MAJOR, 3);
#endif
// PUGL_SAMPLES ??
puglSetEventFunc(view, puglEventCallback);
}


Loading…
Cancel
Save