English 中文(简体)
开放式GL自动密码生成器来自病媒图像
原标题:OpenGL auto code generator from a vector image

Is there any kind of application, tool, lib, ... that generates OpenGL functions from a vector image? To avoid any misunderstanding: I don t want to render something like an SVG file in my 2D OpenGL project, I want to create vector image in my favourite vector app and convert it to OpenGL code instead of create it by code. That will saves lots of time.

问题回答

Don t产生开放式GL代码。 以能够装入VBO的形式储存外部数据。 • 编制数据编码,如:

struct { float position[3]; float texcoord[2]; float color[4]; } vertices[] =
{
    // Auto-gen code here...
    { {1, 1, 0}, {0, 1}, {1, 0, 1, 1} },
    ...
};

But you might find that it s just as easy (and faster to compile) if you memory map the data straight in from a binary data file. Of course, the code version has the advantage of living right inside your executable without having to mess around with app resources, which in turn has the disadvantage of not letting you change the vector image without a recompile.





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签