Created
December 19, 2020 16:47
-
-
Save codingminecraft/9760bc172ec30f03b1a9fd0438516f9a to your computer and use it in GitHub Desktop.
OpenGL VB Debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' I changed lines 85-88 to this | |
Renderer.AddLayer(BackgroundBuffer.RenderID) | |
'Renderer.AddLayer(BackgroundBuffer.FrameBufferID, Source, Destination) | |
Renderer.UpdateImage(GB.RenderID, GB.Image) | |
Renderer.AddLayer(GB.RenderID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' I commented out line 95 in UpdateImage: | |
'GL.Clear(ClearBufferMask.ColorBufferBit) | |
' I moved the TexParameteri functions, and changed the data types in TexImage2D | |
' I also changed the function AddImageBuffer (lines 153-163): | |
Dim Data As BitmapData = Image.LockBits(New Drawing.Rectangle(0, 0, Image.Width, Image.Height), ImageLockMode.ReadOnly, Imaging.PixelFormat.Format32bppArgb) | |
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, TextureMinFilter.Linear) | |
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, TextureMagFilter.Linear) | |
GL.TexImage2D(TextureTarget.Texture2D, | |
0, PixelInternalFormat.Rgba8, | |
Image.Width, Image.Height, 0, PixelFormat.Rgba, | |
PixelType.UnsignedByte, Data.Scan0) | |
Image.UnlockBits(Data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment