How to create a BasicEffect - Errors in Vulkan / OpenGL renderers
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- csharp, github
- Área
- documentation
Línea de trabajo
Start with the linked Basic Effect guide and reproduce the issue using the linked BasicEffectFromEmptyGame project, running its DesktopVK and DesktopGL projects as described. Compare the guide’s example with the error and black triangle reported across the two renderers; done means the documented example runs without the Vulkan crash and displays the vertex colors in OpenGL.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
While trying to follow the How to create a Basic Effect guide, starting from the new Empty Game template, running the Platforms.DesktopVK project ended up crashing with the following error:
Unhandled exception. System.InvalidOperationException: An error occurred while preparing to draw. This is probably because the current vertex declaration does not include all the elements required by the current vertex shader. The current vertex declaration includes these elements: POSITION0, NORMAL0, COLOR0.
$(String[] args) in /home/sylvain/Programmes/Jeux/DungeonCrawlerTest (Copie)/Platforms/DesktopVK/Program.cs:line 4
at Microsoft.Xna.Framework.Graphics.VertexInputLayout.GenerateInputElements(VertexAttribute[] inputs, MGG_InputElement[]& elements, Int32[]& strides)
at Microsoft.Xna.Framework.Graphics.Shader.GetOrCreateLayout(VertexBufferBindings vertexBuffers)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformApplyState(Boolean applyShaders)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawUserPrimitives[T](PrimitiveType primitiveType, T[] vertexData, Int32 vertexOffset, Int32 primitiveCount, VertexDeclaration vertexDeclaration)
at BasicEffectFromEmptyGame.Game1.Draw(GameTime gameTime) in /home/sylvain/Programmes/Jeux/DungeonCrawlerTest (Copie)/Source/Game1.cs:line 99
at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.NativeGamePlatform.RunLoop()
at Program.
The same code when running the Platforms.DesktopGL project doesn't crash, but prints a black triangle (it should have been vertex colored):
I couldn't test the Platforms.DirectX12 build working on a Linux environment with the following specs:
- OS: Ubuntu 24.04.5 LTS (64-bit)
- GNOME version: 46
- windowing system: X11
- kernel version: Linux 7.0.0-43-generic
How to reproduce?
- Clone the reproduction repository: [https://github.com/raaaahman/BasicEffectFromEmptyGame][https://github.com/raaaahman/BasicEffectFromEmptyGame)
- Run
dotnet run --project Platforms/DesktopVK/BasicEffectFromEmptyGame.DesktopVK.csprojanddotnet run --project Platforms/DesktopGL/BasicEffectFromEmptyGame.DesktopGL.csproj - Optional. Comment Game1.cs: line 44 and run the projects again. Notice this doesn't change the issue.
- Lenguaje dominante
- C#
- Estrellas
- 20
- Forks
- 97
- Merge medio
- 8 d 1 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MonoGame/docs.monogame.github.io
-
Docs typoAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
MonoGame/docs.monogame.github.io#328 · 1 comentario ·
-
URGENT! Update documentation on how to install Wine on MacOSQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
MonoGame/docs.monogame.github.io#308 · 1 comentario ·
-
Dificultad 2/5 1-2 días Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MonoGame/docs.monogame.github.io#263 · 3 comentarios ·
Todos los issues de MonoGame/docs.monogame.github.io
Issues similares
-
type:task ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
elsa-workflows/elsa-foundation#5253 ·
Los mantenedores suelen responder en 1 día