• Advertisement
Sign in to follow this  
  • entries
    570
  • comments
    2427
  • views
    216617

Untitled

Sign in to follow this  

86 views

Okay, so I've finished the very basic core of the GUI system (again...) and it works. There are a couple issues currently which are pretty easy to fix, like sending a control to the front is a really slow operation (since the list of controls within a container is stored as a vector; I'll probably change that to a deque or a list. Probably a deque.)

I also was talking with Evil Steve about his awesome texture-management system (essentially implementing a texture palette), and I have to say, it would be awesome to have something like that. The only hurdle really is getting OpenGL to render to a texture, which is a pain.

After about 20 minutes of Googling and digging around the redbook, I found a really good solution - glTexSubImage*() class of functions, which are designed to copy a block of pixels from system memory onto a texture in video memory. Which is perfect for what we want to do! Hooray!

Now I just need to look up a couple more things, like how to get the maximum supported texture size of the hardware, and maybe some data clustering algorithms or something. I've got one in my head cooked up that I'll jot down later and see if it works on paper.

But yeah. Hooray Steve!
Sign in to follow this  


2 Comments


Recommended Comments

glTexSubImage would actually be faster in this case, since it wouldn't involve reading from the backbuffer at all. It just writes directly to texture memory from system memory, which is basically all that I need.

Thanks for the help though <3

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement