小编Nic*_*mot的帖子

什么术语"genType"在OpenGL/GLSL中意味着什么?

在GLSL文档中,该术语genType通常用作参数类型.例如,该函数dot记录如下:

float dot(genType x,
          genType y);

double dot(genDType x,
           genDType y);
Run Code Online (Sandbox Code Playgroud)

这个词genType是什么意思?它的缩写是什么?它是否用于OpenGL之外的其他地方?

opengl graphics glsl

26
推荐指数
1
解决办法
8457
查看次数

在TGA文件格式中,x origin和y origin的目的是什么?

TGA图像规范包含以下两个字段:

Field 5.1 (2 bytes) - X-origin of Image:
    These bytes specify the absolute horizontal coordinate for the lower
    left corner of the image as it is positioned on a display device having
    an origin at the lower left of the screen (e.g., the TARGA series).

Field 5.2 (2 bytes) - Y-origin of Image:
    These bytes specify the absolute vertical coordinate for the lower
    left corner of the image as it is positioned on a display device having
    an origin …
Run Code Online (Sandbox Code Playgroud)

file-format specifications image tga

6
推荐指数
1
解决办法
748
查看次数

Lua为什么不能跳出功能呢?

来自Lua编程第3版第38页

练习4.5:你能解释为什么Lua有一个限制,即goto不能跳出一个函数吗?(提示:你将如何实现该功能?)

我有几个猜测,为什么会这样:

  • 如果你从一个功能跳到另一个功能而第二个功能返回,那么PC在哪里?
  • 如果你有a = f()但f goto在那行代码之后做了什么,那么它的价值是a多少?
  • 由于不同平台的调用约定,是否无法定义标准行为?

我想知道作者将如何回答这个问题.也许我会给他发电子邮件.

与此同时,还有其他人有什么想法吗?

lua

5
推荐指数
1
解决办法
1779
查看次数

MSBuild - >(箭头/破折号更大/ - >)运算符有什么作用?

什么是->(或->)运算符中的MSBuild吗?

来自另一个问题的一些示例代码:文件跟踪器日志文件格式

<!-- Appended tlog to track custom build events -->
<WriteLinesToFile
  File="$(IntDir)$(ProjectName).write.1.tlog"
  Lines="@(CustomBuildStep-&gt;'^%(Identity)');@(CustomBuildStep-&gt;MetaData('Outputs')-&gt;FullPath()-&gt;Distinct())"/>
Run Code Online (Sandbox Code Playgroud)

奖金问题:@(CustomBuildStep-&gt;'^%(Identity)')上面的代码做了什么?

msbuild visual-studio

5
推荐指数
1
解决办法
1121
查看次数

当可以重复使用“ do”时,为什么Lua中存在“ then”关键字?

为什么关键字“ then”和“ do”都存在?

if x == 1 do
    print(x)
end
Run Code Online (Sandbox Code Playgroud)

可读性与

if x == 1 then
    print(x)
end
Run Code Online (Sandbox Code Playgroud)

lua

3
推荐指数
1
解决办法
324
查看次数

为什么OpenGL会为对象而不是指针提供句柄?

OpenGL的传统是让用户使用unsigned int句柄操作OpenGL对象.为什么不直接给指针?唯一ID比指针有什么优势?

opengl uniqueidentifier

3
推荐指数
1
解决办法
490
查看次数