I've been writing this small ray-tracing engine in C/C++, and so far I've got basic functionality, where the finished image gets written to an image. However, I want to be able to create a window and get low-level access to its framebuffer. Is there a way I can do this in Windows without using any external library such as SDL3 or MiniFB?
Creating a window just to get its framebuffer?
177 views Asked by Matthew G. At
1
There are 1 answers
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in WINAPI
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Changing the theme of a #32768 (menu) window class at runtime
- Issue with GetOpenFileName while debugging
- How to populate a ListBox with SendMessage?
- Is there a function to end a child process?
- HDR video publishing
- Frameless Qt + WinAPI maximized window size is bigger than the availableGeometry()
- Mount .iso file with python
- What is Win32 x86-64 CONTEXT::VectorRegister for?
- WinAPI - right mouse drag & drop and IContextMenu
- Win32 per-filesystem cache tuning?
- Client connection timeout during Android & Windows PC communication via sockets
- MessageBoxEx sometimes shows as hollow window, border only, and only on Windows 11
- Win32api send message and Pydirectinput and Powertoy (Keyboard Manager ) Not working when open the application
- Would it be possible to run an application right after csrss.exe loads? (Windows)
Related Questions in GRAPHICS
- How to fix "Access violation executing location" when using GLFW and GLAD
- Why is the value of `gl_FragCoord.z` is always 0.5?
- A way to warp an image based on a map
- Spacing out overlapping rectangles: how to translate pseudocode?
- 3D graph in Rstudio (time vs intensity vs coefficient)
- I want to create a creative website based on my project. I am new in this field
- Color each field in a mosaic plot in R
- How to convert raw RGB luminance using OCIO
- CPU Ray Tracer finds intersection for only a certain setup
- How do I dynamically change vertex colors using Direct3d 12 and Visual C++?
- Python Mediapipe replace chest pose landmark lines with custom image
- I was following Computer Graphics from Scratch -- Getting distorted spheres
- Convert coordinates in android
- Python Mediapipe replace pose landmark line drawings with custom image drawings
- Is there a way to automatically export OpenOffice/LibreOffice drawings to bitmaps, with options?
Related Questions in FRAMEBUFFER
- What happens when rendering an OpenGL buffer that has been padded with NULL (or another value)?
- glBlitFramebuffer - glReadBuffer and glDrawBuffer refer to the same buffer
- My embedded application doesn't receive keyboard events (Linux framebuffer/Qt+QML application/systemd service/VNC server)
- Default render color vector for fragment shader when using a frame buffer with multiple attachment?
- RPI Pico put PNG in Framebuffer
- Can we have graphical server on ttyS*
- android openGL ES blur effect gives line on screen
- Proper way to read from a texture in a compute shader which uses a storage texture
- Linux simple-framebuffer is not detected by kernel
- Inconsistent in results of Python and C programs while getting info about FrameBuffer in Ubuntu
- value error when creating an instance of framebuf.FrameBuffer in MicroPython
- Creating a window just to get its framebuffer?
- Unwanted cursor with Java2D drawing directly to framebuffer
- Fragment Shader Multiple Output and Reading from FrameBuffer Object Issue
- How to stream the Transparency image on framebuffer using gstreamer command
Related Questions in RAYTRACING
- How to convert raw RGB luminance using OCIO
- CPU Ray Tracer finds intersection for only a certain setup
- How can I send large arrays of objects to a fragment shader using WebGL2?
- VK_ERROR_DEVICE_LOST on create acceleration structure and possible ways to debug it
- get ray direction for voxel raymarcher
- Need help reducing image quality with samples per pixel in ray tracer
- Implementing the Phong reflection model in a compute shader - unexpected response to change of spectral and diffuse coefficients
- Implementing BVH for Ray Tracing Renderer in Python with Pygame
- How can I use (resource) barriers to sync access to a `RWTexture2D` between different shaders?
- Simultaneous access to the same pixel in a ray generation shader - is it safe?
- Path tracer fireflies
- CreateStateObject returns E_INVALIDARG - How to figure out what precisely the cause is?
- BVH structure not working in shaders but work in cpp code
- Efficient way of traversing an Octree and doing ray hit intersection in a shader
- Render only the front faces of 3D objects in a raytracer
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
On Windows you can use WinAPI to create a Window.
Here is an example of a Window with a button:
Instead of a button you need a kind of canvas where you can draw. One way is to use WinAPI + GDI for this.
Your bitmap class could look like this:
Your canvas can then make use of this bitmap. A canvas class could look like this:
The implementation of the paint method:
How the canvas is created:
setPixel:
Have also a look at PixelToaster.
If you want to got the WinAPI + GDI approach you can also find more information in the book "Programming Windows: The Definitive Guide To The Win32 Api"
As an alternative, you can create a OpenGL/Direct3D/Vulkan renderer device an a texture object, and write to the texture memory an upload it.
You can also use tev. It provides a network protocol to write to its framebuffer. This way you get tone mapping for free.
Also Qt can be an option for you - you can use a QImage and draw it on a widget - e.g.: