Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Direct access to the screen
« previous next »
  • Print
Pages: [1]

Author Topic: Direct access to the screen  (Read 2205 times)

Offline fun_bidoux

  • Member
  • *
  • Posts: 2
Direct access to the screen
« on: July 25, 2008, 03:03:50 PM »
Hello,

I would like to know if their is any way to get a direct access to the screen like in SDL (SDL_Surface->pixels) because i'm trying to port a game that I made  in C.

Thank,
Logged

Offline gnu

  • Member
  • *
  • Posts: 269
Re: Direct access to the screen
« Reply #1 on: July 25, 2008, 03:27:33 PM »
I don't think so. You'll have to use lcd_drawpixel().
Logged

Offline fun_bidoux

  • Member
  • *
  • Posts: 2
Re: Direct access to the screen
« Reply #2 on: July 25, 2008, 04:54:31 PM »
Ok... thank,

Logged

Offline mcuelenaere

  • Developer
  • Member
  • *
  • Posts: 392
Re: Direct access to the screen
« Reply #3 on: July 30, 2008, 04:13:23 AM »
There is, if you're not in a plugin you can directly access
Code: [Select]
lcd_framebuffer[y][x]
but I believe this isn't accessible from within a plugin (and probably you're wanting to make one).

edit:
Ok, I was wrong :)
As the people below me explain you can access it from rb->lcd_framebuffer[][]
« Last Edit: July 30, 2008, 04:25:21 AM by mcuelenaere »
Logged

Offline shotofadds

  • Developer
  • Member
  • *
  • Posts: 368
Re: Direct access to the screen
« Reply #4 on: July 30, 2008, 04:19:45 AM »
You can do the same thing from a plugin, using rb->lcd_framebuffer.
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Direct access to the screen
« Reply #5 on: July 30, 2008, 04:22:27 AM »
rb->lcd_framebuffer[] is what you need.  Various plugins use it.

It's important to note that this isn't the actual screen though - just an in-RAM copy of what is being displayed on the LCD.  To transfer the data to the LCD, call rb->lcd_update() or rb->lcd_update_rect()

It's also important to note that the format of the data in this array is device-dependent, so  if you want to bypass the graphics API in this way, you'll need different drawing code for different devices.  I don't think there's any documentation on the different lcd formats, but looking at firmware/export/lcd.h and firmware/drivers/lcd-*.c should help (as well as looking at other plugins).
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Direct access to the screen
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.092 seconds with 15 queries.