Git Product home page Git Product logo

egl_offscreen_opengl's Introduction

egl_offscreen_opengl's People

Contributors

svenpilz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

egl_offscreen_opengl's Issues

For those want to use CMake

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}
)

Excellent work!

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.