Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Daivuk

Draw pixel on surface (texture)

This topic is 5623 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, in directX, you can draw pixel on surface. But not I''m using OpenGL for some reason. I''m making a game like starcraft and want a minimap. I have to draw pixel on it every frame (like unit point and fog of war), how can I do it in OpenGL ?? Draw directly on texture..? Thankx

Share this post


Link to post
Share on other sites
Advertisement
dont do it like that, paint the map, then blend in the units and then blend over with fog. either multipass or just multitexturing. Dont change the pixels.

Share this post


Link to post
Share on other sites
Thats how I plan to do.
for I have to draw the Fog every frame.
And My unit layer, Have to draw pixel On it.

The question I asked here is not How to draw a minimap, its :
HOW TO CHANGE THE RGB or RGBA of A PIXEL OF A TEXTURE.

Share this post


Link to post
Share on other sites
he answered you..
YOU DONT.

get it !?
unless you want a shit slow engine i suggest you take his advise.

and dont yell or come across hostile if someone tried to help you and you didnt get the response you wanted.

-- a dancing person appears insane to those who cannot hear the music
http://homepages.paradise.net.nz/danu/ -- Just click it

Share this post


Link to post
Share on other sites
Just becourse you ask so nicely ill give you an answer
glTexSubImage2D
you can look up the rest yourself.

Share this post


Link to post
Share on other sites
---> glDrawPixels <---
I will use it for Unit drawing un the unit layer.

And will use ->glSubImage<- for the fog of war layer, to draw circle.

This is for minimap (the little square in the bottom of the screen)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!