I've been trying and searching about it without success...
I have a computer with 2 GPUs and 2 screens, I'm trying to use the primary GPU and screen to render a GUI and the second pair to show the application log.
I also tried to copy the term lib in attempt to have a parallel term, but term2.write still writes to the main screen...
This is what I have so far:
local term2
local primaryGpu = component.gpu
local primaryScreen = component.screen
---@type component.gpu
local secondaryGpu
---@type component.screen
local secondaryScreen
for gpuAddr in pairs(component.list("gpu"))doifnot component.isPrimary(gpuAddr)thenfor screenAddr in pairs(component.list("screen"))doifnot component.isPrimary(screenAddr)then---@type component.gpu
local gpu = component.proxy(gpuAddr)---@type component.screen
local screen = component.proxy(screenAddr)
screen.turnOn()
gpu.bind(screenAddr,true)
beep()
secondaryGpu = gpuAddr
secondaryScreen = screenAddr
component.setPrimary("gpu", secondaryGpu)
component.setPrimary("screen", secondaryScreen)print("Second monitor?")
component.setPrimary("gpu", primaryGpu)
component.setPrimary("screen", primaryScreen)--[[term2 =require("copied_term")
term2.bind(gpu, screen)
term2.setCursor(1,1)
term2.setCursorBlink(true)
term2.clear()
term2.write("Screen loaded. Uptime: "..uptime())]]--endendendend
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I've been trying and searching about it without success...
I have a computer with 2 GPUs and 2 screens, I'm trying to use the primary GPU and screen to render a GUI and the second pair to show the application log.
I also tried to copy the term lib in attempt to have a parallel term, but term2.write still writes to the main screen...
This is what I have so far:
Do you have any idea?
Link to post
Share on other sites