gumaola / camera-glsurfaceview Goto Github PK
View Code? Open in Web Editor NEWA practice of GLSurfaceView in Camera,Camera2,CameraX.
A practice of GLSurfaceView in Camera,Camera2,CameraX.
In CameraActivity there is an integer value from intent extra to handle camera api type (camera v1, camera v2 or camerax). But only value 1 for camera v1 and value 2 for camera v2, for camerax will return (not handled)
`
@OverRide
protected void onCreate(@nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_camera);
preview = findViewById(R.id.preview);
Intent i = getIntent();
int apiV = i.getIntExtra(api_version, 1);
//创建camera api
if (apiV == 1) {
camera = new CameraV1Interface(this, Camera.CameraInfo.CAMERA_FACING_BACK);
} else if (apiV == 2) {
camera = new CameraV2Interface(this, CameraCharacteristics.LENS_FACING_BACK);
}
if (camera == null) {
return;
}
//创建engine
engine = new EmptyEngine(this, camera, preview);
preview.setRenderer(engine);
}
`
I'm new in shaders, and I don't understand how can I apply any shader to GLSurfaceView. Your project is only one I found, that realy works great, and I want blur shader in my camera app like you have gray, and I don't know how to apply it. Do you know how to do this? Is that possible? As I understand it, I need to change the files fragment_shader.glsl and vertex_shader.glsl. But how exactly? Thank you in advance. Your project is very informative
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.