Comments (13)
Yes, this should absolutely be done. Is there some nice crossplatform way to do it?
from ppsspp.
I know there is glut. But don't know if it has api for offscreen rendering.
On C# I used OpenTK, that did already all the work. Maybe reading some parts of the source would help.
But I dont think there will be a crossplatform way. But offscreen rendering would be useful just on desktop platforms: mac, linux and windows.
To initializate a context on windows you use wgl api and on linux glx.
http://www.opengl.org/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib
http://www.gamedev.net/topic/613994-question-about-opengl-initialization-for-offscreen-rendering/
from ppsspp.
I took a quick stab at this:
https://github.com/unknownbrackets/ppsspp/compare/headless
But I guess the harder part is comparing the results? I mean, I assume we want to have some acceptable level of variance or something, but maybe not...?
Edit: also, native spits all kinds of stuff out to stdout too, making the python script less than entirely happy.
-[Unknown]
from ppsspp.
So, what about using ImageMagick's compare? I know it's an external dependency, but it's often available and easy to install on Windows. We could then maybe define in the test (perhaps printf("Allowed variance: X\n");
or something) how correct it must be?
-[Unknown]
from ppsspp.
Sounds good to me, although we could also simply add some basic image comparer to PPSSPP itself, you could send in the picture to compare to as an argument. We can already load PNGs and comparing is just a matter of looping through the pixels and computing some sort of error sum and then thresholding it...
from ppsspp.
Well, comparing it directly is fine, I'm just worried about the error sum / threshold part.
unknownbrackets/ppsspp@hrydgard:master...screenshot
I took a stab at it, but I'm obviously doing it wrong. Copying the vram gets me black (which is what it does in the emulator), and glReadPixels()
didn't work either (but I probably used it wrong, I just used GL_BACK.)
I have verified it's actually drawing... at least, I can see things if I set WINDOW_VISIBLE
to true.
-[Unknown]
from ppsspp.
Have this working now, I just need to clean it up a bit and write a few clean tests to validate it's working properly.
-[Unknown]
from ppsspp.
Cool!
from ppsspp.
Btw, we should add an option in PPSSPP to write the image (and depth buffer etc) back to VRAM properly, it is possible that some game would use the CPU to read the frame or depth buffer, this is especially common with games that want to check if their sun lens flare should be drawn or not by checking the depth buffer at the position of the sun...
Of course this is very expensive so should only be used for games that would really need it.
from ppsspp.
is it a new feature ? or already implemented but need to toggle for performance wise
from ppsspp.
What we're talking about here is to be able to write GPU test, where we run a little test program on both PSP and PPSSPP and compare the resulting images.
But yes that part (reading back the image from an OpenGL buffer to VRAM) can indeed become a feature with a toggle. I don't know if many games will need it.
from ppsspp.
I see .thanks for explain it to me . i think you mean to put those depth/color test as an option to toggle .correct me if i'm wrong .
from ppsspp.
If a game is going to check for the VRAM, they will have to wait that drawing is done and use SIGNAL with SYNC or something similar. We can probably use this at our advantage.
from ppsspp.
Related Issues (20)
- add a native .pmf player (could work with .at3 files, etc) HOT 1
- Kenka Bancho won't stay connected to peer in Night Out mode HOT 16
- super easy ListBox update for MPO+ JPN cracked NIDs HOT 3
- can't build emulator in RetroPie Lubuntu HOT 2
- Broken thumbnail for gto
- Audio stuttering while using Vulkan HOT 4
- Check thread stack memory overflow HOT 5
- I would like an option to output dump files in the exact order in which the textures were displayed. HOT 3
- Opening the Memory Stick folder is making PPSSPP to crash
- (Question) Does the "InternalResolution" variable support custom resolution? HOT 4
- Kingdom Hearts Birth By Sleep Final Mix fade transitions look bad HOT 3
- buildbot site down HOT 11
- forums full of spam, consider switching to github discussions instead HOT 4
- iOS: Should disallow languages that we can't render with our fallback fonts as defaults
- CHD files don't work when using the FileProvider API from a frontend application HOT 7
- Monster hunter unite The is horrible bug PPSSPP emulator in a specific device HOT 3
- PPSSPP does not ask for file permissions unless Browse is used HOT 10
- avcodec_decode_audio4 in Grand Theft Auto: Chinatown Wars HOT 14
- PPSSPP warns about bad performant CHD while using ZSTD HOT 16
- Ppsspp opening on pause screen from a frontend v1.17.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppsspp.