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
    1
    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
    8
    GBAtemp Patron
    gudenau is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 7, 2010
    United States
    /dev/random
    The template in examples sets a pixel, try that.
     
  3. julian20

    julian20 GBAtemp Fan

    Member
    3
    Jan 10, 2015
    Germany
    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
    1
    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
    3
    Jan 10, 2015
    Germany
    Here is a picture
    EDIT: sry doesnt checked that you posted a message
     

    Attached Files:

  6. marc00077

    marc00077 GBAtemp Regular

    Member
    1
    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
    1
    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
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice