我有Visual Studio社区2015的问题.当我取消选中" 工具"|"文本编辑器"|"所有语言"|"自动大括号完成"选项时,它始终会恢复为选定状态.有人知道怎么修这个东西吗?

为什么我的程序在渲染 128 个粒子时很慢?我认为这不足以获得低于 30 fps 的速度。
我所做的就是渲染 128 个粒子并赋予它们一些基本的引力
on_draw 函数
def on_draw(self, time=None):
glClearColor(0.0, 0.0, 0.0, 1.0)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
glLoadIdentity()
self.particles.append(Particle())
for particle in self.particles:
particle.draw()
if particle.is_dead:
self.particles.remove(particle)
Run Code Online (Sandbox Code Playgroud)
粒子类
class Particle:
def __init__(self, **kwargs):
self.acceleration = Vector2(0, 0.05)
self.velocity = Vector2(random.uniform(-1, 1), random.uniform(-1, 0))
self.position = Vector2()
self.time_to_live = 255
self.numpoints = 50
self._vertices = []
for i in range(self.numpoints):
angle = math.radians(float(i) / self.numpoints * 360.0)
x = 10 * math.cos(angle) + self.velocity[0] + 300
y …Run Code Online (Sandbox Code Playgroud) 我不知道如何确定 BMP 图像是否包含 BGR 或 BGRA 颜色。我编写了简单的 BMP 阅读器,但不同图像上有不同的值。
我已经找到了两个选择。
有什么方法可以从位图信息标题中找出哪个选项?