运行时检查-堆栈帧(RTC)和怪异的OpenGL行为 [英] run time check - stack frames (RTCs) and weird OpenGL behavior

查看:113
本文介绍了运行时检查-堆栈帧(RTC)和怪异的OpenGL行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我有一个使用OpenGL的应用程序.当使用RTC编译时,它可以正常工作.但是,如果不使用此选项进行编译,则会出现图形异常.

I've got an app that uses OpenGL. When compiled with RTCs it works just fine. However, when compiled without this option graphical anomalies occur.

例如,如果绘制由几个立方体组成的对象,它将绘制该对象,但线框可见并且颜色都错误(也很慢).

E.g., if drawing an object made up of several cubes, it will draw the object but the wireframe is visible and the colors are all wrong (it is also very slow).

我不知道它是否有帮助,但是RTC打开时FRAPS会提供返回FPS,但关闭时不会提供FPS-因此,似乎OpenGL或窗口管理(Win32)都有问题?

I don't know if it helps, but FRAPS will give return FPS for when RTCs is on, but not when it is off - so it seems like there is some problem either with OpenGL or with the window management (Win32)?

真的很感谢所有提示...

Any hints at all are really appreciated ...

(编译器报告的唯一错误是一些与可能的信息丢失有关的错误,例如,将双精度型输入到采用浮点数的函数时,将出现_no_运行时错误-不管运行时检查设置如何.)

(the only errors that the compiler reports are some errors related to possible loss of information, e.g. when doubles are input to function that take floats, there are _no_ run-time errors - regardless of the run time check setting).

欢呼

andreas

推荐答案

嗨andreascf,

经过一些研究,我不相信OpenGL和编译器选项/RTC存在普遍问题.看来 是设计或实施问题.通过选项/RTC的定义,它启用了堆栈帧运行时错误检查 将局部变量初始化为非零值 检测到超限和不足局部变量,例如arrays和堆栈指针验证.确实有助于避免某些运行时数据损坏 堆.

After a little bit research, I don’t believe there is a general problem with OpenGL and compiler option /RTCs. It seems to be a design or implement issue. By the definition of option /RTCs, it enables stack frame run-time error checking initialization of local variables to a nonzero value, detection of overruns and underruns of local variables such as arrays , and stack pointer verification. It really helps to avoid some running time data corruption on stack.

>>(编译器报告的唯一错误是与可能丢失信息有关的一些错误, 例如将双精度数输入到采用浮点数的函数时,将存在_no_运行时错误-不管运行时检查设置如何.

>>(the only errors that the compiler reports are some errors related to possible loss of information, e.g. when doubles are input to function that take floats, there are _no_ run-time errors - regardless of the run time check setting).

编译器仅报告语法,生成和链接错误.应用程序执行时会发生运行时错误.

欢呼

Yi


这篇关于运行时检查-堆栈帧(RTC)和怪异的OpenGL行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆