• Advertisement
Sign in to follow this  

Drawing pixels really fast...

This topic is 3498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone... how is it going ? Im here again for yet another question. I would like to know which is the fastest way to draw a few pixels on screen. OGL has specific functions for zooming/drawing pixels? or i will have to go with 1x1 GL_QUAD |OR| GL_POINTS and a hard-coded function for scaling a set of pixels? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
draw pixels to a texture. Draw a full screen quad to the screen who's texture is the one that you're manually modifying

-me

Share this post


Link to post
Share on other sites
Well , actually im coding an S.M.S emulator, so there aren't going to be any textures.

I will have to render a large amount of pixels on the screen , and im looking for pixel-specific functions(IF there are).

Thanks for the help , though.

Share this post


Link to post
Share on other sites
Hi,
perhaps it would help if you could be more specific on what you want to do.

If you just want some colored pixels on your screen, I think GL_POINTS or GL_QUADS is the fastest way to do this (or at least fast enough).
You could probably also generate a texture and draw it in ortho mode.

Bye, Michael

[edit] okay, too slow... ;-)
Have you tried drawing points in ortho mode? is the rendering speed really a problem?

Share this post


Link to post
Share on other sites
Quote:
Original post by kroneml
Hi,
perhaps it would help if you could be more specific on what you want to do.

If you just want some colored pixels on your screen, I think GL_POINTS or GL_QUADS is the fastest way to do this (or at least fast enough).
You could probably also generate a texture and draw it in ortho mode.

Bye, Michael


Like i said in my previous message(i think you missed it judging by the time you posted :D ) , its going to be an emulator.



Thanks for the help.

Share this post


Link to post
Share on other sites
It doesn't matter if "there are no textures". Just create one in memory to write too and then texture that to a fullscreen quad using glOrtho mode. That's the fastest way to draw pixels to the screen

-me

Share this post


Link to post
Share on other sites
Quote:

[edit] okay, too slow... ;-)
Have you tried drawing points in ortho mode? is the rendering speed really a problem?


No i haven't tried , but i just doing some research before i actually start coding the renderer.


Quote:

It doesn't matter if "there are no textures".
Just create one in memory to write too and then texture that to a fullscreen quad using glOrtho mode. That's the fastest way to draw pixels to the screen


I see ... thanks!, so i will have to follow these steps:

*create an empty "texture"(outside main loop)
*Modify the pixels of the texture at runtime
*Bind the texture
*Render a quad equal to screen bounds

I got it right?

Share this post


Link to post
Share on other sites
If you're writing an emulator and all you need to do is push pixels, then there's zero point in using OpenGL at all. Use a simpler, software-based rasterizer that already exists, or roll your own.

SDL or TinyPTC would make good choices, if you don't want to do all the low-level stuff (though its not at all that hard for basic pixel plotting and simple primitives/bitmaps.)

Share this post


Link to post
Share on other sites
Quote:
Original post by 3Dgonewild
I got it right?


Pretty sure that's the gist but Ravyne's suggestion is better =)

-me

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement