Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
99 posts
|
Hello
With opengl >4.3 ist seems that glu.gluBuild2DMipmaps ist deprecated. Now in want set automatically some Mipmaps, but nothing works. I have tested it with this code sequenz but it fails, only a base map can be created, but no mipmaps: gl.glTexParameteri( GL4.GL_TEXTURE_3D, GL4.GL_TEXTURE_MIN_FILTER, GL4.GL_LINEAR_MIPMAP_LINEAR); gl.glTexParameteri( GL4.GL_TEXTURE_3D, GL4.GL_TEXTURE_BASE_LEVEL, 0); gl.glTexParameteri( GL4.GL_TEXTURE_3D, GL4.GL_TEXTURE_MAX_LEVEL, 2); gl.glTexImage3D( GL4.GL_TEXTURE_3D, 0, format, width, height, 1, 0, format, GL4.GL_UNSIGNED_BYTE, null ); gl.glTexSubImage3D( GL4.GL_TEXTURE_3D, 0, 0, 0, 0, width(), height, 1, format, GL4.GL_UNSIGNED_BYTE, datas); gl.glGenerateMipmap( GL4.GL_TEXTURE_3D ); Have somewhere a tip, how i can this resolve? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6044 posts
|
What makes you think it is deprecated?
You can look at how JMonkeyEngine and JogAmp's Ardor3D Continuation create their mipmaps. The former uses glGenerateMipmap.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
99 posts
|
hello
I have read, that in OpenGL 4.0, the entire fixed-function pipeline (used by glu*) is deprecated. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6044 posts
|
Actually, JOGL GLU can use native GLU but by default it uses the Java implementation which doesn't require GL2 to create mipmaps:
https://github.com/sgothel/jogl/blob/master/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java glGenerateMipmap isn't deprecated anyway.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
99 posts
|
Thanks
You are right, but glGenerateMipmap works not correct. It should correct create the mipmaps, but there are no such. Theoretically it should create the mipmaps, i want not copy existing mipmaps. What i want is an automatic generation of mipmaps to a base map. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6044 posts
|
There is probably something wrong in your code, glGenerateMipmap is used in JMonkeyEngine, it works correctly but you pass null to glTexImage3D, look at your last parameter.
Edit.: Maybe you're right: http://stackoverflow.com/questions/25138320/glgeneratemipmap-doesnt-work-with-3d-textures-in-opengl
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
99 posts
|
Hi
I have also testet with gl.glTexImage3D( GL4.GL_TEXTURE_3D, 0, format, width, height, 1, 0, format, GL4.GL_UNSIGNED_BYTE, datas ); alone. Only the (base) map what ist in datas was drawn correct. In the shader i call then // the base map, that is ok vec4 textureColor = texture(colormap, vec3(texCoord[0],0)); then a new test with vec4 textureColor = texture(colormap, vec3(texCoord[0],1)); and so on. I can't see mipmapping I have also testet with GL4.GL_TEXTURE_2D_ARRAY, but nothing, the same problem. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6044 posts
|
I fear that it works only with GL_TEXTURE_2D. If it fails even in this case, it will probably come from your code.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
99 posts
|
This post was updated on Sep 09, 2014; 7:35pm.
I think, then is there a problem with auto generation
for mipmaps. The glut functions are only utils, for there, are no specification planed in the future, i think. The gluBuild2DMipmaps are sure not supported in the future, i think. Only, in the moment, it seems there is no aquivalent function. It's not a problem. So i kick out that case in my functions, and all mipmaps must created before. (I have send an email to Nvidea, they can that solve that in the Krohnos Group. The normal user need here a solution.) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
99 posts
|
In reply to this post by gouessej
SOLVED!
There are two problems with that. First, the glGenerateMipmap function works only after the following code sequenz was made: glTexParameteri( GL4.GL_TEXTURE_2D, GL4.GL_TEXTURE_MIN_FILTER, GL4.GL_LINEAR_MIPMAP_LINEAR); glTexImage2D(GL4.GL_TEXTURE_2D, .......); glGenerateMipmap(GL4.GL_TEXTURE_2D,); (there are no chance with GL4.GL_TEXTURE_3D or GL4.GL_TEXTURE_2D_ARRAY in opengl 4.4, because that is not yet implemented says the runtime) Second, the texture(...) - and the textureLod(...) inline shader functions handels the lod counter different. It seems, textureLod works correct. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6044 posts
|
Thank you for the feedback but this is probably already implemented that way in JMonkeyEngine.
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |