Registriert: Mo Sep 02, 2002 15:41 Beiträge: 867 Wohnort: nahe Stuttgart
dsn hat geschrieben:
Am besten wäre es auch nennt sie nicht mehr Texturen sondern einfach Bilder.
Also der Begriff "Textur" ist eigentlich nicht mit Spielen verknüpft, eine Textur ist ein Bild, dass du im OpenGL-Renderer verwenden kannst, indem du es auf irgendwelche Polygone mappst (Texture Mapping). Nur kurz als Info.
Zitat:
Nachteil ist es läuft zwar auf meinem Notebook, und auf meinem Zukünftigen HTPC aber nicht auf meinem Game Rechner z.B.
Da drängt sich eigentlich die Frage auf: Wieso nicht? Der entsprechende Standard ist gute 10 Jahre alt. Bei Game-Rechner tippe ich mal drauf, dass der eigentlich nicht so ausgestattet sein kann, dass das nicht unterstützt wird. Wenn der Rückgabewert der gluBuild2DMipmaps-Funktion <> 0 ist, übergib ihn mal an gluErrorString().
mW. erzeugt die Fkt eine neue Surface und gibt nen Pointer drauf zurück. Du überschreibst damit aber dann den Pointer auf die alte Surface. Also in eine neue PSDLSurface-Variable schreiben und zum Schluss beide Surfaces freigeben.
Das sind Extensions. Extensions sind die Möglichkeit für Hersteller, ARB oder EXT Funktionen einzubauen, die kein fester Bestandteil der OpenGL-Spezifikationen sind. Alle Karten, die eine dieser texture_rectangle-Extension haben, sollten damit eigentlich in der Lage sein, NPOT-Texturen zu laden.
Hm und ich dachte das hätte ich bereits, immerhin greife ich ja auf die SDL Units zu.
Es kommt kein Fehler, die Funktion scheint ja auch zu gehen, er lädt das bild ja aber er kommt wohl mit dem Transparenten nicht klar.
Wenn ich eine neue Surface erstelle, warum kann ich meine alte denn nicht überschreiben? Theoretisch brauche ich die doch nicht mehr.
Das werde ich aber mal austesten.
Registriert: Do Sep 02, 2004 19:42 Beiträge: 4158
Programmiersprache: FreePascal, C++
Versuch mal folgendes vor dem Aufruf von SDL_ScaleSurfaceRect:
Code:
SDL_SetAlpha(tex,0,0);
Es kann sein, dass SDL_image dir den SDL_SRCALPHA-Flag reingehauen hat. Dieser sorgt beim kopieren von RGBA Surfaces auf andere RGBA-Surfaces dafür, dass dein Bild dort alphageblendet wird und der Alphakanal der Quellsurface dabei verloren geht, weil der Kanal der Zielsurface nicht verändert wird. Fehlt dieser Flag, werden die Daten einfach kopiert. Mit diesem Aufruf entfernst du diesen Flag.
//Edit: Wenn du dann garnichts mehr siehst, mach aus der letzten 0 mal ne 255
Gruß Lord Horazont
_________________ If you find any deadlinks, please send me a notification – Wenn du tote Links findest, sende mir eine Benachrichtigung. current projects: ManiacLab; aioxmpp zombofant network • my photostream „Writing code is like writing poetry“ - source unknown
„Give a man a fish, and you feed him for a day. Teach a man to fish and you feed him for a lifetime. “ ~ A Chinese Proverb
Ich habe eben mal den OpenGL Extensions Viewer 3.0 über meinen Game Rechner laufen lassen, vllt. kann jemand was damit anfangen.
OpenGL Version 2.1
Zitat:
Renderer: GeForce 6800 GT/AGP/SSE2/3DNOW! Vendor: NVIDIA Corporation Memory: 256 MB Version: 2.1.2 Shading language version: 1.20 NVIDIA via Cg compiler Max number of light sources: 8 Max viewport size: 4096 x 4096 Max texture size: 4096 x 4096 Max anisotropy: 16 Max samples: 16 Max draw buffers: 4 Max texture coordinates: 8 Max vertex texture image units: 4
OpenGL driver version check (Current: 6.14.11.6909, Latest known: 2.1.1): Latest version of display drivers found According the database, you are running the latest display drivers for your video card.
Compiled vertex array support This feature improves OpenGL performance by using video memory to cache transformed vertices.
Multitexture support This feature accelerates complex rendering such as lightmaps or environment mapping.
Secondary color support This feature provides an alternate method of coloring specular highlights on polygons.
S3TC compression support This feature improves texture mapping performance in some applications by using lossy compression.
Vertex array range support This feature improves performance in some applications by using AGP for dynamic vertex transformation.
Texture edge clamp support This feature improves texturing quality by adding clamping control to edge texel filtering.
Vertex program support This feature enables a wide variety of effects via flexible vertex programming (equivalent to DX8 Vertex Shader.)
Fragment program support This feature enables a wide variety of effects via per pixel programming (equivalent to DX9 Pixel Shader.)
Texture anisotropic filtering support This feature improves the quality of texture mapping on oblique surfaces.
Occlusion test support This feature provides hardware accelerated culling for objects.
Point sprite support This feature improves performance in some particle systems.
OpenGL Shading Language support This feature enables high level shading language for shaders.
Frame buffer object support This feature enables render to texture functionality.
Extension verification: GL_EXT_copy_texture was not found, but has the entry point glCopyTexSubImage3DEXT GL_EXT_subtexture was not found, but has the entry point glTexSubImage3DEXT GL_KTX_buffer_region has the entry point glBufferRegionEnabledEXT missing! GL_KTX_buffer_region has the entry point glDeleteBufferRegionEXT missing! GL_KTX_buffer_region has the entry point glDrawBufferRegionEXT missing! GL_KTX_buffer_region has the entry point glNewBufferRegionEXT missing! GL_KTX_buffer_region has the entry point glReadBufferRegionEXT missing! GL_NV_half_float has the entry point glVertexWeighthNV missing! GL_NV_half_float has the entry point glVertexWeighthvNV missing! WGL_NV_vertex_array_range was not found, but has the entry point wglAllocateMemoryNV WGL_NV_vertex_array_range was not found, but has the entry point wglFreeMemoryNV GL_HP_occlusion_test was not found, but is available in driver version 2.0 GL_NV_centroid_sample was not found, but is available in driver version 6.14.10.6562
Hier einmal die meines Notebooks und einmal das Projekt mit Source und Exe.
Davon ab merke ich gerade das das Logo nicht wirklich schön dargestellt ist...
OpenGL Version 1.5
Zitat:
Renderer: MOBILITY RADEON X600 x86/SSE2 Vendor: ATI Technologies Inc. Memory: 64 MB Version: 1.5.4777 WinXP Release Shading language version: 1.00 Max number of light sources: 8 Max viewport size: 4096 x 4096 Max texture size: 2048 x 2048 Max anisotropy: 16 Max samples: 6 Max draw buffers: 4 Max texture coordinates: 8 Max vertex texture image units: 0
OpenGL driver version check (Current: 6.14.10.4777, Latest known: 6.14.10.4955): Outdated version of display drivers detected According the database, you are might be not using the latest version of display drivers for your video card.
Compiled vertex array support This feature improves OpenGL performance by using video memory to cache transformed vertices.
Multitexture support This feature accelerates complex rendering such as lightmaps or environment mapping.
Secondary color support This feature provides an alternate method of coloring specular highlights on polygons.
S3TC compression support This feature improves texture mapping performance in some applications by using lossy compression.
Texture edge clamp support This feature improves texturing quality by adding clamping control to edge texel filtering.
Vertex program support This feature enables a wide variety of effects via flexible vertex programming (equivalent to DX8 Vertex Shader.)
Fragment program support This feature enables a wide variety of effects via per pixel programming (equivalent to DX9 Pixel Shader.)
Texture anisotropic filtering support This feature improves the quality of texture mapping on oblique surfaces.
Occlusion test support This feature provides hardware accelerated culling for objects.
Point sprite support This feature improves performance in some particle systems.
OpenGL Shading Language support This feature enables high level shading language for shaders.
No Frame buffer object support This may break compatibility for applications using render to texture functions.
Extension verification: GL_ARB_imaging was not found, but has the entry point glBlendEquation GL_EXT_copy_texture was not found, but has the entry point glCopyTexSubImage3DEXT GL_EXT_polygon_offset was not found, but has the entry point glPolygonOffsetEXT GL_EXT_subtexture was not found, but has the entry point glTexSubImage3DEXT GL_EXT_framebuffer_object was not found, but is available in driver version 6.14.10.5220
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Registriert: Mo Sep 02, 2002 15:41 Beiträge: 867 Wohnort: nahe Stuttgart
Kurzerhand als Hinweis, wie in einem Thread im Meinungsforum diskutiert, ist es natürlich nicht GL_ARB_texture_rectangle, sondern GL_ARB_texture_non_power_of_two, das ich meinte. Zuviel durch selbstverschuldeten, alten Code verwirrt worden. Sorry für die Verwirrung, habs im Beitrag auf Seite 3 korrigiert.
Mitglieder in diesem Forum: 0 Mitglieder und 4 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.