如何在java eclipse插件中使用自定义OLE dll?(How to use a custom OLE dll in a java eclipse plugin?)
我想在我的Eclipse RCP插件中使用带有控件的自定义OLE dll。
dll在我的工作目录中,但如果我尝试使用它,我会得到一个SWTException:
我使用这个代码:
Display display = Display.getCurrent(); Shell shell = new Shell(display); OleFrame frame = new OleFrame(shell, SWT.NONE); OleClientSite site = new OleClientSite(frame, SWT.NONE, "MyCustomDll.TestControl"); OleAutomation test = new OleAutomation(site); shell.open();
并得到这个例外:
org.eclipse.swt.SWTException: Class ID not found in registry at org.eclipse.swt.ole.win32.OLE.error(OLE.java:317) at org.eclipse.swt.ole.win32.OLE.error(OLE.java:283) at org.eclipse.swt.ole.win32.OleClientSite.<init>(OleClientSite.java:226) ...
我怎么能告诉我的插件在哪里寻找类ID? 必须有一些我缺少的基本点,但我没有找到任何关于使用自定义OLE dll的信息。
I'm trying to use a custom OLE dll with a control in my Eclipse RCP Plugin.
The dll is in my working directory, but if I try to use it I get a SWTException:
I use this code:
Display display = Display.getCurrent(); Shell shell = new Shell(display); OleFrame frame = new OleFrame(shell, SWT.NONE); OleClientSite site = new OleClientSite(frame, SWT.NONE, "MyCustomDll.TestControl"); OleAutomation test = new OleAutomation(site); shell.open();
And get this Exception:
org.eclipse.swt.SWTException: Class ID not found in registry at org.eclipse.swt.ole.win32.OLE.error(OLE.java:317) at org.eclipse.swt.ole.win32.OLE.error(OLE.java:283) at org.eclipse.swt.ole.win32.OleClientSite.<init>(OleClientSite.java:226) ...
How can I tell my plugin where to look for the Class ID? There must be some basic point I'm missing but I didn't find anything about using custom OLE dlls.
原文:https://stackoverflow.com/questions/34283093
最满意答案
使用与屏幕宽高比匹配的正投影,而不是仅发送一堆投影。 除非你有一个方形屏幕,你的左/右不应该与你的上/下相同,否则你会看到歪斜。
Use an ortho projection that matches your aspect ratio of the screen rather than just sending a bunch of ones. Unless you have a square screen, your left/right shouldn't be the same as your top/bottom or you will see skew.
相关问答
更多-
OpenGL ES与OpenGL(OpenGL ES versus OpenGL)[2022-09-16]
OpenGL ES和OpenGL之间的两个更显着的区别是删除了glBegin ... glEnd调用语义进行原始渲染(有利于顶点数组),并为顶点坐标和属性引入了定点数据类型以更好地支持嵌入式处理器的计算能力往往缺乏FPU 看看这里: OpenGL_ES Two of the more significant differences between OpenGL ES and OpenGL are the removal of the glBegin ... glEnd calling semantics f ... -
使用OpenGL ES 2时Android上的纹理中的黑色Alpha(Black Alpha in Textures on Android When Using OpenGL ES 2)[2023-02-04]
这只是猜测。 如果要混合, 则应在glClear函数中使用GL_DEPTH_BUFFER_BIT标志: glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) The problem was Allegro (the library my game uses) uses glBlendFuncSeparate when using OpenGL ES 2.0 -- which SHOULD work, but some phones don't support ... -
有了屏幕截图的好处,我敢说你的设计师已经为面部分配了适当的材料 - 你可能会有一个.MTL文件,该文件与OBJ文件一起使用并包含许多以Ka , Kd和Ns开头的行 - 但不应用任何纹理。 从我可以用obj2opengl做出的,该脚本假定更多的视频游戏风格的呈现,其中,在一些实现中,为表面给出的颜色属性被丢弃并且仅应用纹理。 所以,从技术上讲,你是正确的禁用纹理,但如果你使用ES 1.x你可能想要添加的是一些glMaterial调用,使用脚本似乎不保留的数据。 或者,对于ES 2.x,您将需要模拟经典环境+漫 ...
-
免责声明:此信息基于官方OpenGL | ES规范。 我不知道iphone上的OpenGL | ES实现是否支持压缩纹理。 理论上它应该至少模拟压缩纹理,但你现在永远不会。 您可以通过glCompressedTexImage2D调用加载8位/像素纹理。 您最想要使用的压缩类型是GL_PALETTE8_RGBA8_OES 。 不能直接存储额外的alpha通道和调色板。 您可以将第二个纹理单元用于alpha分量,或者在颜色量化期间考虑alpha并使用包含alpha的调色板格式。 在网上某处有一个名为BRIGHT ...
-
VBO只是让驱动程序将您的几何存储在(可能)视频内存中,而不是像顶点数组一样将其上传到驱动程序的每一帧。 glScalef() , glTranslatef()和glRotatef()工作方式相同。 VBOs just let the driver stash your geometry in (probably) video memory rather than uploading it to the driver each frame as with vertex arrays. glScalef(), ...
-
PVRTC,ATITC,S3TC等等,GPU本地压缩纹理应该会减少内存使用并提高渲染性能。 例如(对不起,在C中,你可以像使用Java中的GL11.glGetString一样实现它), const char *extensions = glGetString(GL_EXTENSIONS); int isPVRTCsupported = strstr(extensions, "GL_IMG_texture_compression_pvrtc") != 0; int isATITCsupported = str ...
-
在程序初始化时,您需要加载2个位图并将其作为2个新纹理上传到GPU( glGenTextures / glBindTexture / GLUtils.texImage2D ),这应该为您提供两个不同的textureID: textureIDs[0]和textureIDs[1] 。 然后,当您在public void draw(GL10 gl)绘制立方体时,您需要使用textureIDs[0]或textureIDs[1]添加对glBindTexture的调用,具体取决于您的按钮状态。 您当前的代码仅将2个纹理 ...
-
使用OpenGL ES绘制纹理(Drawing Textures with OpenGL ES)[2023-08-24]
可能你正在用非整数值翻译你的四边形,这可能导致纹理偏离中心采样,并可能导致一些像这样的工件。 如果你确保所有的2d翻译与屏幕像素对齐,我想你不会再看到问题了。 Likely you're translating your quads by non-integral values, which can cause textures to get sampled off-center, and can cause some artifacts like that. If you make sure that a ... -
这个问题的答案可以在这里找到 如何创建一个适用于Retina显示的CGBitmapContext,而不是浪费空间进行常规显示? 我基本上做的是将纹理和缓冲区乘以屏幕的比例因子,因为这只产生了1/4大小的纹理,我不得不将上下文乘以比例因子 CGContextScaleCTM(context, scaleFactor, scaleFactor); The answer to this question can be found here How to create a CGBitmapContext which ...
-
使用与屏幕宽高比匹配的正投影,而不是仅发送一堆投影。 除非你有一个方形屏幕,你的左/右不应该与你的上/下相同,否则你会看到歪斜。 Use an ortho projection that matches your aspect ratio of the screen rather than just sending a bunch of ones. Unless you have a square screen, your left/right shouldn't be the same as your t ...