Problems writing to the screen buffers

Discussion in '3DS - Homebrew Development and Emulators' started by pimathbrainiac, Aug 29, 2015.

  1. pimathbrainiac
    OP

    pimathbrainiac Newbie

    Newcomer
    4
    0
    Aug 1, 2015
    United States
    I'm having a little bit of trouble with writing to the screen buffers right now. I made a program that has the purpose of setting a pixel at the (0,0) coordinate (adjusted so (0,0) is actually top left).

    Here's my code: http://pastebin.com/ibkqTnLi

    The code compiles fine (duh), but when I run it in Citra, an error about OpenGL rendering (yeah, I know this error is on Citra's side), then the emulator screen pops up blank. I believe that the problem is with my code because I'm able to run the 24bit-color example just fine in Citra.

    Thanks for the help in advance!
     
  2. gudenau

    gudenau Largely ignored

    Member
    3,269
    1,237
    Jul 7, 2010
    United States
    /dev/random
    The template in examples sets a pixel, try that.
     
  3. julian20

    julian20 GBAtemp Fan

    Member
    336
    265
    Jan 10, 2015
    Gambia, The
    I tested your code on my 2ds. I got a red pixel on the top screen bottom-left. Wait i send a picture
     
  4. pimathbrainiac
    OP

    pimathbrainiac Newbie

    Newcomer
    4
    0
    Aug 1, 2015
    United States
    Thanks for that. I just rechecked in Citra, and it is indeed in the bottom left. I was just looking in the wrong place XD
     
  5. julian20

    julian20 GBAtemp Fan

    Member
    336
    265
    Jan 10, 2015
    Gambia, The
    Here is a picture
    EDIT: sry doesnt checked that you posted a message
     

    Attached Files:

  6. marc00077

    marc00077 GBAtemp Regular

    Member
    125
    35
    May 21, 2014
    Netherlands Antilles
    Catalunya
    I assume you know why the red dot appears on BL instead of TL... (Framebuffer is sideways)
     
  7. pimathbrainiac
    OP

    pimathbrainiac Newbie

    Newcomer
    4
    0
    Aug 1, 2015
    United States
    Actually the problem was in my conversion of coordinates I forgot about zero indexing and did height-y instead of height-1-y

    The pixel showed in x=1, which was my hint to how to fix it :P