Skip to main content
gamedev.net
🔒 Locked

Using 8 textures?

Started by jeroenb May 7, 2004 at 4:58 AM 3 replies 600+ views
Original Post
jeroenb
jeroenb
I am trying to use 8 textures just for fun, but it seems my apps still don''t want to work. When I use: glGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &TextureUnitCount); I always get 4, but I have a GeforceFX, so I should be able to use up to 8 textures simultaniously. Any idea how to solve this?
Crafter 2D: the open source 2D game framework ?Github: https://github.com/crafter2d/crafter2d
Twitter: [twitter]crafter_2d[/twitter]
MazyNoc
MazyNoc
In the fixed pipeline you can only use 4 textures at the same time

to be able to use the rest you need to use fragmentprograms, and then you have another query value to get the maximum number of units.

[add] : thats a limitation of nvidia, on ati you have 8 texture units in the fixed pipe

[edited by - MazyNoc on May 7, 2004 6:19:37 AM]
jeroenb
jeroenb
ok, thanks.

[Add] Is this also related to another problem I have: I am trying to implement shadow extrusion on the GPU, but when I use a loop I get 3 fps. Strange thing here is that when I use the CG runtime it works perfectly at 85 fps.

[edited by - jeroenb on May 7, 2004 6:33:08 AM]
Crafter 2D: the open source 2D game framework ?Github: https://github.com/crafter2d/crafter2d
Twitter: [twitter]crafter_2d[/twitter]
MazyNoc
MazyNoc
using a loop.. does that mean GLSL or what?
what CG profile do you use?

jeroenb
jeroenb
No, it means CG. And I use:
vertexProfile = cgGLGetLatestProfile(CG_GL_VERTEX);
cgGLSetOptimalOptions(vertexProfile);

whichs results in the VP_30 if I debug the app. And then I try to use the normal glVertexAttribxxNV, glBindProgramNV, ect functions to run the program. But that gives me framerates of 3. When I use CG to load and bind the program like:

cgGLLoadProgram (vertexProgram);
cgGLBindProgram(vertexProgram);
cgGLEnableProfile(vertexProfile);

Then I get framerates of 85.
Crafter 2D: the open source 2D game framework ?Github: https://github.com/crafter2d/crafter2d
Twitter: [twitter]crafter_2d[/twitter]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.