Change Resolution Error Shadows
Blitz3D Forums/Blitz3D Programming/Change Resolution Error Shadows
| ||
The idea of what I'm doing, is to create a 3D menu that is updated in real time, and has implemented the resolution change, change gamma, however the problem I have now to move to change the resolution of 800 x 600 to 1024 x 768, everything is fine, but upon returning to 800 x 600 in the shade is gone, and according to my logic it should be and I release the shadow system, use Engraphics, clearword ... Any ideas. ![]() Here starts the program for the first time, initializes and FastImage Fastext libs, everything is fine. ![]() Following the second pass resolution 1024 x 768, libs are released and reconstructed the entire scene, respectively, for the creation of the scene ... everything is no problem. ![]() Now the problem is when I return to the first screen resolution of 800 x 600, the shadow disappears = (. ;----------------------------- ; Includes Recusos2 ;----------------------------- Include "Includes\Recursos2.bb" ;----------------------------- ; Includes Especiales -S- ;----------------------------- Include "Includes3\ShadowsSimple.bb" CreateShadow Calidad Global Textura0 = ShadowTexture() ;----------------------------- ; Escena del Menu. ;----------------------------- Crear_Menu() ;----------------------------- ; Bucle Principal. Calidad 0 ;----------------------------- While Not KeyDown(1) TurnEntity Cubo,0,1,0 UpdateShadows Camara,1.0 RenderWorld ; Funciones Opciones_Video() SetGammaIntensity(n) Text_(0,0,FPS()+ "Pantalla" + " " + n,0,0,0) Flip If KeyHit(200) Goto Cambio_Resolucion If CambiandoR = True And Calidad = 0 Goto Cambio_Resolucion End If Wend End ;----------------------------- ; Nueva Resolución. ;----------------------------- .Cambio_Resolucion FreeShadows() CambiandoR = False DeinitDraw() DeInitExt() ClearWorld EndGraphics Goto Inicio :( Last edited 2010 |
| ||
Goto Inicio where's that? |
| ||
the label is in a module called Inicio.bb, then passes menu_principal.bb, I have the program that is broken into modules. Variables.bb, Funciones.bb etc. |
| ||
Prueba este codigo y dime si te funciona. / Test this code and tell me if did work.Include "Include\Fastext.bb" Include "Include\ShadowsSimple.bb" resx = 800 resy = 600 .Inicio Graphics3D resx,resy,32,6 Initext CreateShadow 2 Global Textura0 = ShadowTexture() Luz = CreateLight(1) RotateEntity Luz,50,0,0 ShadowLight Luz Camara= CreateCamera() cub = CreateCube() EntityColor cub,200,0,0 PositionEntity cub,0,.5,5 createshadowcaster cub xx = CreatePlane() PositionEntity xx,0,-1,0 EntityTexture xx,Textura0 ;----------------------------- ; Bucle Principal. Calidad 0 ;----------------------------- While Not KeyDown(1) TurnEntity cub,0,1,0 UpdateShadows Camara,1.0 RenderWorld Flip If KeyHit(200) Goto Cambio_Resolucion Wend End ;----------------------------- ; Nueva Resolución. ;----------------------------- .Cambio_Resolucion FreeShadowCaster% (cub%) FreeShadows() CambiandoR = False ;DeinitDraw() DeInitExt() ClearWorld EndGraphics resx = Rand(800,1024) resy = Rand(600,700) Goto Inicio |
| ||
Joder, si ha funcionado tras el cambio de resolucion / Yes working change Resolutions.Include "Includes3\Fastext.bb" Include "Includes3\ShadowsSimple.bb" resx = 800 resy = 600 .Inicio Graphics3D resx,resy,32,0 Initext CreateShadow 2 Global Textura0 = ShadowTexture() Luz = CreateLight(1) RotateEntity Luz,50,0,0 ShadowLight Luz Camara= CreateCamera() cub = CreateCube() EntityColor cub,200,0,0 PositionEntity cub,0,.5,5 createshadowcaster cub xx = CreatePlane() PositionEntity xx,0,-1,0 EntityTexture xx,Textura0 ;----------------------------- ; Bucle Principal. Calidad 0 ;----------------------------- While Not KeyDown(1) TurnEntity cub,0,1,0 UpdateShadows Camara,1.0 RenderWorld Flip If KeyHit(200) Goto Cambio_Resolucion Wend End ;----------------------------- ; Nueva Resolución. ;----------------------------- .Cambio_Resolucion ;FreeShadowCaster% (cub%) <<<<<<<< no Working XD FreeShadows() CambiandoR = False ;DeinitDraw() DeInitExt() ClearWorld EndGraphics resx = 1204 resy = 768 Goto Inicio Wel net het die nasporing vry te stel, in hierdie geval die kubus, want as jy nie die nuwe resolusie nie laai die skaduwee weer verwyder, in my geval gebeur het die derde oproep besluit om te verander te maak. / Bien solo tenia que liberar el caster, en este caso el cubo, ya que si no lo elimino la nueva resolución no carga la sombra de nuevo, en mi caso sucedia al realizar la tercera llamada de cambio de resolución. / Ahora tengo un problema, que es con FastImage, lo que sucede es que tengo unos botones para el respectivo cambio de la resolución de pantalla, pero al pasar de profundidad de 32 a 16 esos botones dejan de funcionar con TestImage. Un saludo =) Nou het ek 'n probleem, wat is te FastImage, wat gebeur is dat ek' n paar knoppies vir die onderskeie verander die skerm resolusie, maar oor die diepte 32-16 die knoppies ophou werk met TestImage. Groete |
| ||
i am happy xD / Jolines tio me has salvado de una, eso debería hacer el del soporte -.- My code ;======================================================== ; Proyecto : Beta ; Nombre File : Menu_Principal.bb ; Programador : Yue Rexie ; Empresa : Iris3D -Games Studios © ; URL : http://www.iris3d.tk ; © : 2007-2011 ;======================================================== ; OBJETIVO : Menu Principal de Opciones. ;======================================================== ;----------------------------- ; Includes Recusos2 ;----------------------------- Include "Includes\Recursos2.bb" ;----------------------------- ; Includes Especiales -S- ;----------------------------- Include "Includes3\ShadowsSimple.bb" CreateShadow 2 Global Textura0 = ShadowTexture() ;----------------------------- ; Escena del Menu. ;----------------------------- Crear_Menu() ;----------------------------- ; Bucle Principal. Calidad 0 ;----------------------------- While Not KeyDown(1) TurnEntity Cubo,0,1,0 UpdateShadows Camara,1.0 RenderWorld ; Funciones Opciones_Video() SetGammaIntensity(n) Text_(0,0,FPS()+ "Pantalla" + " " + n,0,0,0) Flip If KeyHit(200) Goto Cambio_Resolucion If CambiandoR = True And Calidad = 0 Goto Cambio_Resolucion End If Wend End ;----------------------------- ; Nueva Resolución. ;----------------------------- .Cambio_Resolucion FreeShadowCaster(Cubo) FreeShadows() CambiandoR = False DeinitDraw() DeInitExt() ClearWorld EndGraphics Goto Inicio Edit: Ok men, yes it's bug 16 depth. Last edited 2010 |
| ||
All going according to my needs, special thanks to Tab. =)![]() Shadows and change screen resolution in real time, and Gamma Change. Video Options menu. Last edited 2010 Last edited 2010 |