gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > How can I put a pixel on a screen?

#109355 - akalenuk - Fri Nov 17, 2006 3:55 pm

I use the main screen for 3D graphics and I use edge marking there. Because of some reason it doesn't work well on the border of the screen. The most uncomplicated solution to this is to redraw black 1px with border over the 3D graphics. But how? I haven't found anything suitable for this cause. Can direct memory writing solve the problem?

#109357 - Mighty Max - Fri Nov 17, 2006 4:07 pm

It is possible, but i wouldnt recomment it.

You would need to add another background to the screen, and set it ontop of the 3d via bg priority. However this takes more vram which now cant be used for other purposes, and calculating where you would need to draw the 1px border could be quite expensive for cpu time.

Maybe just drawing a solid border all around via gl would be suitable too to distract from this uglyness?
_________________
GBAMP Multiboot

#109359 - akalenuk - Fri Nov 17, 2006 4:21 pm

Mighty Max wrote:

You would need to add another background to the screen, and set it ontop of the 3d via bg priority.


I thought of this before. You are right, this is not a best solution.

Mighty Max wrote:

However this takes more vram which now cant be used for other purposes, and calculating where you would need to draw the 1px border could be quite expensive for cpu time.


And I do experience a vram shortage.

Mighty Max wrote:

Maybe just drawing a solid border all around via gl would be suitable too to distract from this uglyness?


But how? I've found no 2D routines in DS verion of gl. Or am I getting something wrong?

#109360 - Mighty Max - Fri Nov 17, 2006 4:55 pm

akalenuk wrote:

Mighty Max wrote:

Maybe just drawing a solid border all around via gl would be suitable too to distract from this uglyness?


But how? I've found no 2D routines in DS verion of gl. Or am I getting something wrong?


I don't know really how the nds handles this, but from the naive gl way, i would switch projection matrix to ortho after im done rendering the scene. Set z scaling to 0 and draw the quads/lines whatever.
_________________
GBAMP Multiboot

#109362 - akalenuk - Fri Nov 17, 2006 5:15 pm

Mighty Max wrote:

I don't know really how the nds handles this, but from the naive gl way, i would switch projection matrix to ortho after im done rendering the scene. Set z scaling to 0 and draw the quads/lines whatever.


I think I can do this using quads. At least I'd try this.
Thank you.