Jump to content
  • Advertisement
Sign in to follow this  
PnP Bios

OpenGL improvments for my rendering API

This topic is 4852 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

I was thinking of doing a higher end version of my graphics library, and I was wondering if there were any new features I could impliment on newer cards to help speed stuff up. Right now, I am just using textured quads, and alpha blending for transparency. I was wondering if there were any good 'shaders' or anything I could be using in my API. Some stuff I would like to have. -dyamic manipulation of video memory -hardware non-power of 2 textures -hardware level texture deformation and filters, like wavy water and stuff. Any OpenGL extensions I should look into?

Share this post


Link to post
Share on other sites
Advertisement
Well, technically with the help of GLU you can have non-square textures but they still the lengths have to be power of two. I can't myself understand the benefit of forexample 23x13 textures, especially if you want to have more high end library.

Dynamic Manipulation of video memory should be easy with VBO and FBO. VBO made the ARB a year back and is called ARB_vertex_buffer_object. You can also have index buffer, which is nice.

As far as I know and I'm too lazy to recheck, FBO is still on EXT stage so its not part of the ARB spec and I am personally avoiding it until it reaches ARB, (we'll see if it ever will, especially since card manufacturers are dropping opengl support).

For vertex shaders, I will recommend GLSL. GLSL is dangerous though, because it enables you to have your own pipeline and your own rendering stages. When I started using GLSL I had to do a complete engine re-write due to the incredible amount of possibilities it offered.

With fragment programs you could do dynamic scattering even if you have a 2d library which is nice. Also I'd imagine it'd help to speed up special effects if done properly. Shaders are a whole another world though and they enable a new set of problems to deal with so bear that in mind.

GLSL is a good way to start using shaders, because its easy and well documented although there are still some driver bugs due to shoddy implementation.

Share this post


Link to post
Share on other sites
What do you mean by dynamical manipulation of video memory? Allocating and freeing, moving blocks around? There shouldn't be any need for anything else except allocation and de-allocation which is done via the ARB_vertex_buffer_object extension. The graphics driver will take care of memory management fine on its own and performance should be fine if you maintain proper VBO sizes (not too small - 100 vertices and not too big - >65000).

Hardware non-power of 2 textures are done via the ARB_texture_non_power_of_two. Again asses what advantages this would give you as it's a fairly new extension which doesn't work on older cards.

Share this post


Link to post
Share on other sites
Quote:
Well, technically with the help of GLU you can have non-square textures but they still the lengths have to be power of two.


You can use non-square textures in GL without needing GLU the dimensions have to be a power of 2 though. There is a function in GLU which builds mip-maps that works fine with non power of two textures though it's actually resizing the texture to a power of two version.

Quote:
hardware level texture deformation and filters, like wavy water and stuff.


You could look into pixel and vertex shaders. They'd allow you to do all kinds of fancy effects.

[Edited by - Monder on August 6, 2005 8:15:12 AM]

Share this post


Link to post
Share on other sites
I already have a prety clever hack that allows for non power of two textures, and unusualy large sized textures.

I want to dyanmicaly handle video memory so I don't have to keep copies of the textures in system memory. That's all.

Where can I find some good information on starting with pixel shaders?

Share this post


Link to post
Share on other sites
Quote:
Original post by Ilici
Again asses what advantages...

I suppose you meant assess. [grin]

Quote:
Original post by PnP Bios
I already have a pretty clever hack that allows for non power of two textures, and unusually large sized textures.

I want to dyanmicaly handle video memory so I don't have to keep copies of the textures in system memory. That's all.

You could always just retrieve the texture whenever you need it, using glGetTexImage. I'm not sure if it's possible to avoid having it in system memory at all. Perhaps you could use FBOs. (I'm not really sure, becaues I haven't looked into FBOs myself).

Quote:

Where can I find some good information on starting with pixel shaders?

If you're willing, then the OpenGL shading language is a good book.
Otherwise there are plenty of tutorials at Lighthouse 3D.

Share this post


Link to post
Share on other sites
Quote:
Original post by PnP Bios
I already have a prety clever hack that allows for non power of two textures, and unusualy large sized textures.

I want to dyanmicaly handle video memory so I don't have to keep copies of the textures in system memory. That's all.

Where can I find some good information on starting with pixel shaders?




as for the textures from what i have read the textures are kept in video memory as long as its possible if you need more video memory for other things the textures are transfered into system memory automatically at least thats how i understood it as i read the red book


as for pixelshaders

developer.nvidia.com/page/tools

download the CG toolkit it features a shader compiler and you can request different shader profiles
the latest cg compiler shall be pretty good in optimization
and its api independent meaning you can use it with D3D and opengl

Share this post


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

  • 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!