Example program for creating an OpenGL context with EGL for offscreen rendering with a framebuffer.
Based on https://www.khronos.org/registry/egl/sdk/docs/man/html/eglIntro.xhtml.
OpenGL with EGL for offscreen rendering
License: MIT License
Example program for creating an OpenGL context with EGL for offscreen rendering with a framebuffer.
Based on https://www.khronos.org/registry/egl/sdk/docs/man/html/eglIntro.xhtml.
cmake_minimum_required(VERSION 3.10)
#set(CMAKE_CXX_STANDARD 14)
project (egl)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
# Include OpenCV header files
find_package(OpenCV REQUIRED)
find_package(OpenGL REQUIRED COMPONENTS OpenGL EGL)
link_directories(${OPENGL_LIBRARIES_DIRS} ${OPENGL_LIBRARIES_DIRS})
include_directories(${CMAKE_SOURCE_DIR} ${OPENGL_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
add_executable(egl egl.cpp)
# add_executable(egl read_obj.cc)
target_link_libraries(egl
PRIVATE ${OpenCV_LIBRARIES}
PRIVATE OpenGL::OpenGL OpenGL::EGL
)
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR})
install(
TARGETS egl
DESTINATION ${CMAKE_INSTALL_PREFIX}
)
Hi, is it possible to add support for docker?
This repo is what i want!
I'm new to OpenGL. I wrote a program using freeglut api to draw a triangle and save the screen as a .png file with certain view.
At first, it works on my own PC. But when I try to run it on an Amazon EC2 instance, it failed to create a opengl context.
After search on google, egl is the solution, but it's really hard to find a runnable code. Then I found this repo! Thanks for sharing such a runnable and commented demo to us!
I found an triangle demo at
https://github.com/matusnovak/rpi-opengl-without-x
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.